Skip to content

Conversation

@dmitry-workato
Copy link

@dmitry-workato dmitry-workato commented Jan 17, 2026

I got some linter failure about non-modern
slice.sort() call (go 1.25.4) and the benchmark check is using suffix '12' for the comparison.

I got some linter failure about non-modern
slice.sort() call and the benchmark check is using suffix '12'
for the comparison.
@dmitry-workato
Copy link
Author

dmitry-workato/bwarr - (main) > make
go test -count 1 ./...
ok      github.com/dronnix/bwarr        0.365s
golangci-lint run -c qa/.golangci.yml
0 issues.
go test -bench=BenchmarkQA -benchtime 1000000x ./... | tee qa/bench.tmp
goos: darwin
goarch: arm64
pkg: github.com/dronnix/bwarr
cpu: Apple M3 Pro
BenchmarkQA_Insert-12                            1000000               162.7 ns/op            66 B/op          0 allocs/op
BenchmarkQA_ReplaceOrInsertNotFound-12           1000000              1343 ns/op              66 B/op          0 allocs/op
BenchmarkQA_ReplaceOrInsertFound-12              1000000               215.4 ns/op        37.14 MB/s           0 B/op          0 allocs/op
BenchmarkQA_HasFound-12                          1000000               263.1 ns/op        30.41 MB/s           0 B/op          0 allocs/op
BenchmarkQA_HasNotFoundWorst-12                  1000000              2213 ns/op           3.62 MB/s           0 B/op          0 allocs/op
BenchmarkQA_Min-12                               1000000                84.18 ns/op            0 B/op          0 allocs/op
BenchmarkQA_Max-12                               1000000                79.76 ns/op            0 B/op          0 allocs/op
BenchmarkQA_Delete-12                            1000000               693.4 ns/op             0 B/op          0 allocs/op
BenchmarkQA_DeleteMin-12                         1000000                36.95 ns/op            0 B/op          0 allocs/op
BenchmarkQA_DeleteMax-12                         1000000                36.49 ns/op            0 B/op          0 allocs/op
PASS
ok      github.com/dronnix/bwarr        17.413s
go test -bench=BenchmarkLongQA -benchtime 2s ./... | tee -a qa/bench.tmp
goos: darwin
goarch: arm64
pkg: github.com/dronnix/bwarr
cpu: Apple M3 Pro
BenchmarkLongQA_NewFromSlice-12                              294           8230370 ns/op         1181150 B/op         40 allocs/op
BenchmarkLongQA_InsertRandom-12                              190          12606331 ns/op         2068131 B/op        141 allocs/op
BenchmarkLongQA_AscendRandom-12                             1017           2366669 ns/op            1680 B/op          2 allocs/op
BenchmarkLongQA_AscendInc-12                                4104            585735 ns/op            1680 B/op          2 allocs/op
BenchmarkLongQA_AscendDec-12                                5036            486077 ns/op            1680 B/op          2 allocs/op
BenchmarkLongQA_AscendRange-12                              3495            578196 ns/op            1680 B/op          2 allocs/op
BenchmarkLongQA_AscendWithDelSeries-12                      4171            583459 ns/op            1680 B/op          2 allocs/op
BenchmarkLongQA_DescendRandom-12                            1002           2393527 ns/op            1680 B/op          2 allocs/op
BenchmarkLongQA_DescendRangeWithDelSeries-12                5079            483148 ns/op            1680 B/op          2 allocs/op
BenchmarkLongQA_UnorderedWalkRandom-12                     29656             82196 ns/op               0 B/op          0 allocs/op
BenchmarkLongQA_UnorderedWalkWithDelSeries-12              24466             89030 ns/op               0 B/op          0 allocs/op
PASS
ok      github.com/dronnix/bwarr        31.171s
cat qa/bench.tmp | gobenchdata --json qa/cur_bench.json
detected 2 benchmark suites
successfully output results as json to 'qa/cur_bench.json'
gobenchdata checks eval --checks.config qa/gobenchdata-checks.yml qa/last_bench.json qa/cur_bench.json --json qa/rep.json
report output written to qa/rep.json
gobenchdata checks --checks.config qa/gobenchdata-checks.yml report qa/rep.json
|    | BASE | CURRENT | PASSED CHECKS | FAILED CHECKS | TOTAL |
|----|------|---------|---------------|---------------|-------|
| ❌ |      |         |             0 |             1 |     1 |

|    | CHECK |         PACKAGE          |                   BENCHMARK                   |  DIFF  |            COMMENT             |
|----|-------|--------------------------|-----------------------------------------------|--------|--------------------------------|
| ✅ |       | github.com/dronnix/bwarr | BenchmarkQA_Insert-12                         |  -9.56 |                                |
| ✅ |       | github.com/dronnix/bwarr | BenchmarkQA_ReplaceOrInsertNotFound-12        |  -2.33 |                                |
| ✅ |       | github.com/dronnix/bwarr | BenchmarkQA_ReplaceOrInsertFound-12           | -16.67 |                                |
| ✅ |       | github.com/dronnix/bwarr | BenchmarkQA_HasFound-12                       |   1.04 |                                |
| ✅ |       | github.com/dronnix/bwarr | BenchmarkQA_HasNotFoundWorst-12               |  -5.02 |                                |
| ❌ |       | github.com/dronnix/bwarr | BenchmarkQA_Min-12                            |  27.66 | exceeded maximum 10.000000     |
|    |       |                          |                                               |        | (+17.66)                       |
| ❌ |       | github.com/dronnix/bwarr | BenchmarkQA_Max-12                            |  21.70 | exceeded maximum 10.000000     |
|    |       |                          |                                               |        | (+11.70)                       |
| ✅ |       | github.com/dronnix/bwarr | BenchmarkQA_Delete-12                         |  -7.89 |                                |
| ✅ |       | github.com/dronnix/bwarr | BenchmarkQA_DeleteMin-12                      |  -7.88 |                                |
| ✅ |       | github.com/dronnix/bwarr | BenchmarkQA_DeleteMax-12                      |  -7.92 |                                |
| ✅ |       | github.com/dronnix/bwarr | BenchmarkLongQA_NewFromSlice-12               |  -7.65 |                                |
| ✅ |       | github.com/dronnix/bwarr | BenchmarkLongQA_InsertRandom-12               |  -7.80 |                                |
| ✅ |       | github.com/dronnix/bwarr | BenchmarkLongQA_AscendRandom-12               | -10.46 |                                |
| ✅ |       | github.com/dronnix/bwarr | BenchmarkLongQA_AscendInc-12                  | -10.75 |                                |
| ✅ |       | github.com/dronnix/bwarr | BenchmarkLongQA_AscendDec-12                  |  -8.80 |                                |
| ✅ |       | github.com/dronnix/bwarr | BenchmarkLongQA_AscendRange-12                | -14.44 |                                |
| ✅ |       | github.com/dronnix/bwarr | BenchmarkLongQA_AscendWithDelSeries-12        | -13.89 |                                |
| ✅ |       | github.com/dronnix/bwarr | BenchmarkLongQA_DescendRandom-12              |  -9.52 |                                |
| ✅ |       | github.com/dronnix/bwarr | BenchmarkLongQA_DescendRangeWithDelSeries-12  |  -9.99 |                                |
| ✅ |       | github.com/dronnix/bwarr | BenchmarkLongQA_UnorderedWalkRandom-12        | -69.30 |                                |
| ✅ |       | github.com/dronnix/bwarr | BenchmarkLongQA_UnorderedWalkWithDelSeries-12 | -66.58 |                                |

make: *** [bench] Error 1
dmitry-workato/bwarr - (main) > gs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant