Fix Benchmark tests, remove a broken one & add two new #15250

Merged
6543 merged 23 commits from benchmark_tests into master 2021-04-16 18:30:17 +00:00
Showing only changes of commit 3e7d2a85b3 - Show all commits

View File

@ -6,7 +6,6 @@ package integrations
import (
"fmt"
"math/rand"
"net/http"
"testing"
@ -67,15 +66,6 @@ func BenchmarkRepo(b *testing.B) {
}
}
//StringWithCharset random string (from https://www.calhoun.io/creating-random-strings-in-go/)
func StringWithCharset(length int, charset string) string {
b := make([]byte, length)
for i := range b {
b[i] = charset[rand.Intn(len(charset))]
}
return string(b)
}
func BenchmarkRepoBranchCommit(b *testing.B) {
b.Skip("benchmark broken") // TODO fix
samples := []int64{1, 15, 16}