[PR #557] [MERGED] Fix benchmarktests #15453

Closed
opened 2025-11-02 11:46:52 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/557
Author: @kjellkvinge
Created: 1/2/2017
Status: Merged
Merged: 1/3/2017
Merged by: @lunny

Base: masterHead: master


📝 Commits (1)

📊 Changes

1 file changed (+17 additions, -13 deletions)

View changed files

📝 models/graph_test.go (+17 -13)

📄 Description

Hi. In #428 I was asked to create benchmark tests for the new feature (timeline).

I have now been made aware that these benchmark test make no sense. I'm sorry about that.

This PR fixes the tests. Note: the performance impact of that PR (#428) is quite a bit.

On my laptop, I get:

$go test -v  -bench Commit -run Commit

PASS
BenchmarkGetCommitGraph-4   	      20	  72745337 ns/op
BenchmarkParseCommitString-4	 1000000	      2614 ns/op
ok  	code.gitea.io/gitea/models	4.229s

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/557 **Author:** [@kjellkvinge](https://github.com/kjellkvinge) **Created:** 1/2/2017 **Status:** ✅ Merged **Merged:** 1/3/2017 **Merged by:** [@lunny](https://github.com/lunny) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`d17826b`](https://github.com/go-gitea/gitea/commit/d17826b5f579748da029eabb7662b17b755092a2) Fix benchmarktests ### 📊 Changes **1 file changed** (+17 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `models/graph_test.go` (+17 -13) </details> ### 📄 Description Hi. In #428 I was asked to create benchmark tests for the new feature (timeline). I have now been made aware that these benchmark test make no sense. I'm sorry about that. This PR fixes the tests. Note: the performance impact of that PR (#428) is quite a bit. On my laptop, I get: ``` $go test -v -bench Commit -run Commit PASS BenchmarkGetCommitGraph-4 20 72745337 ns/op BenchmarkParseCommitString-4 1000000 2614 ns/op ok code.gitea.io/gitea/models 4.229s ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 11:46:52 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#15453