-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drop callerPackage and introduce NewHandle
Drop callerPackage as it was too costly and replace it with a named handle that we can use in metrics etc. The named handle can then be provided automatically with hive's module provider for per-module transaction cost accounting. Before: goos: linux goarch: amd64 pkg: github.com/cilium/statedb cpu: Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz BenchmarkDB_WriteTxn_1-8 240938 4752 ns/op 210459 objects/sec BenchmarkDB_WriteTxn_10-8 502363 2551 ns/op 392063 objects/sec BenchmarkDB_WriteTxn_100-8 457850 2279 ns/op 438872 objects/sec BenchmarkDB_WriteTxn_100_SecondaryIndex-8 526416 2222 ns/op 450100 objects/sec BenchmarkDB_RandomInsert-8 1012 1181665 ns/op 846264 objects/sec BenchmarkDB_RandomReplace-8 216 5048896 ns/op 198063 objects/sec BenchmarkDB_SequentialInsert-8 398 2996997 ns/op 333667 objects/sec ... BenchmarkDB_DeleteTracker_Baseline-8 390 3036951 ns/op 329278 objects/sec BenchmarkDB_DeleteTracker-8 141 8194663 ns/op 122031 objects/sec BenchmarkDB_RandomLookup-8 8846 134745 ns/op 7421428 objects/sec BenchmarkDB_SequentialLookup-8 8425 123284 ns/op 8111372 objects/sec BenchmarkDB_FullIteration_All-8 103279 10996 ns/op 90941891 objects/sec BenchmarkDB_FullIteration_Get-8 84451 13637 ns/op 73328686 objects/sec BenchmarkDB_PropagationDelay-8 235146 5342 ns/op 48.00 50th_µs 57.00 90th_µs 215.0 99th_µs PASS ok github.com/cilium/statedb 31.480s After: goos: linux goarch: amd64 pkg: github.com/cilium/statedb cpu: Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz BenchmarkDB_WriteTxn_1-8 310290 3885 ns/op 257388 objects/sec BenchmarkDB_WriteTxn_10-8 523450 2441 ns/op 409679 objects/sec BenchmarkDB_WriteTxn_100-8 538578 2219 ns/op 450628 objects/sec BenchmarkDB_WriteTxn_100_SecondaryIndex-8 515170 2156 ns/op 463816 objects/sec BenchmarkDB_RandomInsert-8 1110 1081693 ns/op 924477 objects/sec BenchmarkDB_RandomReplace-8 237 5034048 ns/op 198647 objects/sec BenchmarkDB_SequentialInsert-8 380 3048134 ns/op 328070 objects/sec ... BenchmarkDB_DeleteTracker_Baseline-8 396 3066078 ns/op 326150 objects/sec BenchmarkDB_DeleteTracker-8 169 7019558 ns/op 142459 objects/sec BenchmarkDB_RandomLookup-8 8839 137467 ns/op 7274474 objects/sec BenchmarkDB_SequentialLookup-8 8958 124483 ns/op 8033258 objects/sec BenchmarkDB_FullIteration_All-8 97218 11356 ns/op 88057271 objects/sec BenchmarkDB_FullIteration_Get-8 78102 14373 ns/op 69577187 objects/sec BenchmarkDB_PropagationDelay-8 245020 4727 ns/op 42.00 50th_µs 48.00 90th_µs 210.0 99th_µs PASS ok github.com/cilium/statedb 31.520s Signed-off-by: Jussi Maki <[email protected]>
- Loading branch information
Showing
5 changed files
with
95 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters