Closed otherview closed 1 month ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 62.58%. Comparing base (
ef93676
) to head (ae6264f
). Report is 2 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
On darwin arm64, with mainnet
data
➜ benchstat master.txt pr.txt
master.txt:7: parsing iteration count: invalid syntax
goos: darwin
goarch: arm64
pkg: github.com/vechain/thor/v2/logdb
│ master.txt │ pr.txt │
│ sec/op │ sec/op vs base │
FakeDB_NewestBlockID/newest_block_id-10 174.4µ ± 23% 201.0µ ± ∞ ¹ ~ (p=0.524 n=8+5)
FakeDB_WriteBlocks-10 2.018 ± ∞ ¹ 2.021 ± ∞ ¹ ~ (p=0.841 n=5)
TestDB_HasBlockID-10 3.419 ± ∞ ¹ 3.299 ± ∞ ¹ ~ (p=0.151 n=5)
TestDB_FilterEvents/Empty_Response-10 40.46µ ± ∞ ¹ 40.92µ ± ∞ ¹ ~ (p=0.056 n=5)
TestDB_FilterEvents/AddressCriteriaFilter-10 3.007 ± ∞ ¹ 13.572 ± ∞ ¹ ~ (p=0.222 n=5)
TestDB_FilterEvents/TopicCriteriaFilter-10 27.28 ± ∞ ¹ 26.84 ± ∞ ¹ -1.61% (p=0.008 n=5)
TestDB_FilterEvents/EventLimit-10 2.388 ± ∞ ¹ 2.343 ± ∞ ¹ ~ (p=0.095 n=5)
TestDB_FilterEvents/EventLimitDesc-10 2.499 ± ∞ ¹ 2.454 ± ∞ ¹ ~ (p=0.310 n=5)
TestDB_FilterEvents/EventRange-10 1.362 ± ∞ ¹ 1.441 ± ∞ ¹ +5.85% (p=0.008 n=5)
TestDB_FilterEvents/EventRangeDesc-10 1.351 ± ∞ ¹ 1.500 ± ∞ ¹ +11.03% (p=0.008 n=5)
TestDB_FilterTransfers/Empty_Response-10 24.44µ ± ∞ ¹ 25.36µ ± ∞ ¹ ~ (p=0.151 n=5)
TestDB_FilterTransfers/TransferCriteria-10 193.6µ ± ∞ ¹ 178.7µ ± ∞ ¹ -7.73% (p=0.016 n=5)
TestDB_FilterTransfers/TransferCriteriaDesc-10 189.7µ ± ∞ ¹ 179.7µ ± ∞ ¹ -5.29% (p=0.008 n=5)
TestDB_FilterTransfers/Ranged500K-10 387.1m ± ∞ ¹ 360.4m ± ∞ ¹ -6.89% (p=0.032 n=5)
TestDB_FilterTransfers/Ranged500KDesc-10 375.9m ± ∞ ¹ 365.1m ± ∞ ¹ -2.88% (p=0.016 n=5)
geomean 70.88m 78.53m +10.78%
¹ need >= 6 samples for confidence interval at level 0.95
│ master.txt │ pr.txt │
│ B/op │ B/op vs base │
FakeDB_NewestBlockID/newest_block_id-10 9.147Ki ± ∞ ¹ 6.771Ki ± ∞ ¹ -25.98% (p=0.008 n=5)
FakeDB_WriteBlocks-10 204.8Mi ± ∞ ¹ 163.0Mi ± ∞ ¹ -20.42% (p=0.008 n=5)
TestDB_HasBlockID-10 522.6Mi ± ∞ ¹ 373.8Mi ± ∞ ¹ -28.47% (p=0.008 n=5)
TestDB_FilterEvents/Empty_Response-10 3.064Ki ± ∞ ¹ 2.698Ki ± ∞ ¹ -11.95% (p=0.008 n=5)
TestDB_FilterEvents/AddressCriteriaFilter-10 752.5Mi ± ∞ ¹ 628.3Mi ± ∞ ¹ -16.51% (p=0.008 n=5)
TestDB_FilterEvents/TopicCriteriaFilter-10 757.3Mi ± ∞ ¹ 633.1Mi ± ∞ ¹ -16.41% (p=0.008 n=5)
TestDB_FilterEvents/EventLimit-10 807.6Mi ± ∞ ¹ 676.6Mi ± ∞ ¹ -16.22% (p=0.008 n=5)
TestDB_FilterEvents/EventLimitDesc-10 809.1Mi ± ∞ ¹ 678.4Mi ± ∞ ¹ -16.15% (p=0.008 n=5)
TestDB_FilterEvents/EventRange-10 397.9Mi ± ∞ ¹ 333.0Mi ± ∞ ¹ -16.31% (p=0.008 n=5)
TestDB_FilterEvents/EventRangeDesc-10 397.9Mi ± ∞ ¹ 333.0Mi ± ∞ ¹ -16.31% (p=0.008 n=5)
TestDB_FilterTransfers/Empty_Response-10 2.673Ki ± ∞ ¹ 2.354Ki ± ∞ ¹ -11.95% (p=0.008 n=5)
TestDB_FilterTransfers/TransferCriteria-10 45.94Ki ± ∞ ¹ 37.74Ki ± ∞ ¹ -17.84% (p=0.008 n=5)
TestDB_FilterTransfers/TransferCriteriaDesc-10 45.94Ki ± ∞ ¹ 37.74Ki ± ∞ ¹ -17.84% (p=0.008 n=5)
TestDB_FilterTransfers/Ranged500K-10 85.15Mi ± ∞ ¹ 70.45Mi ± ∞ ¹ -17.27% (p=0.008 n=5)
TestDB_FilterTransfers/Ranged500KDesc-10 85.15Mi ± ∞ ¹ 70.45Mi ± ∞ ¹ -17.27% (p=0.008 n=5)
geomean 11.32Mi 9.293Mi -17.91%
¹ need >= 6 samples for confidence interval at level 0.95
│ master.txt │ pr.txt │
│ allocs/op │ allocs/op vs base │
FakeDB_NewestBlockID/newest_block_id-10 245.0 ± ∞ ¹ 149.0 ± ∞ ¹ -39.18% (p=0.008 n=5)
FakeDB_WriteBlocks-10 4.348M ± ∞ ¹ 2.889M ± ∞ ¹ -33.56% (p=0.008 n=5)
TestDB_HasBlockID-10 19.00M ± ∞ ¹ 11.00M ± ∞ ¹ -42.11% (p=0.008 n=5)
TestDB_FilterEvents/Empty_Response-10 66.00 ± ∞ ¹ 42.00 ± ∞ ¹ -36.36% (p=0.008 n=5)
TestDB_FilterEvents/AddressCriteriaFilter-10 37.00M ± ∞ ¹ 20.50M ± ∞ ¹ -44.59% (p=0.008 n=5)
TestDB_FilterEvents/TopicCriteriaFilter-10 37.16M ± ∞ ¹ 20.66M ± ∞ ¹ -44.41% (p=0.008 n=5)
TestDB_FilterEvents/EventLimit-10 39.57M ± ∞ ¹ 22.23M ± ∞ ¹ -43.83% (p=0.008 n=5)
TestDB_FilterEvents/EventLimitDesc-10 39.53M ± ∞ ¹ 22.19M ± ∞ ¹ -43.87% (p=0.008 n=5)
TestDB_FilterEvents/EventRange-10 19.52M ± ∞ ¹ 10.91M ± ∞ ¹ -44.13% (p=0.008 n=5)
TestDB_FilterEvents/EventRangeDesc-10 19.52M ± ∞ ¹ 10.91M ± ∞ ¹ -44.13% (p=0.008 n=5)
TestDB_FilterTransfers/Empty_Response-10 58.00 ± ∞ ¹ 38.00 ± ∞ ¹ -34.48% (p=0.008 n=5)
TestDB_FilterTransfers/TransferCriteria-10 2.453k ± ∞ ¹ 1.424k ± ∞ ¹ -41.95% (p=0.008 n=5)
TestDB_FilterTransfers/TransferCriteriaDesc-10 2.453k ± ∞ ¹ 1.424k ± ∞ ¹ -41.95% (p=0.008 n=5)
TestDB_FilterTransfers/Ranged500K-10 4.653M ± ∞ ¹ 2.686M ± ∞ ¹ -42.29% (p=0.008 n=5)
TestDB_FilterTransfers/Ranged500KDesc-10 4.653M ± ∞ ¹ 2.686M ± ∞ ¹ -42.29% (p=0.008 n=5)
geomean 458.3k 268.7k -41.38%
¹ need >= 6 samples for confidence interval at level 0.95
On darwin arm64, with testnet
data
➜ benchstat master.txt pr.txt
master.txt:7: parsing iteration count: invalid syntax
goos: darwin
goarch: arm64
pkg: github.com/vechain/thor/v2/logdb
│ master.txt │ pr.txt │
│ sec/op │ sec/op vs base │
FakeDB_NewestBlockID/newest_block_id-10 192.3µ ± 29% 194.8µ ± 31% ~ (p=0.879 n=13+10)
FakeDB_WriteBlocks-10 2.017 ± 3% 2.005 ± 1% ~ (p=0.143 n=10)
TestDB_HasBlockID-10 3.461 ± 2% 3.274 ± 6% -5.39% (p=0.005 n=10)
TestDB_FilterEvents/Empty_Response-10 40.64µ ± 1% 40.01µ ± 4% ~ (p=0.481 n=10)
TestDB_FilterEvents/AddressCriteriaFilter-10 2.994 ± 52% 3.595 ± 279% ~ (p=0.971 n=10)
TestDB_FilterEvents/TopicCriteriaFilter-10 17.55 ± 82% 17.55 ± 85% ~ (p=0.143 n=10)
TestDB_FilterEvents/EventLimit-10 2.375 ± 4% 2.224 ± 6% ~ (p=0.063 n=10)
TestDB_FilterEvents/EventLimitDesc-10 2.484 ± 12% 2.420 ± 44% ~ (p=0.353 n=10)
TestDB_FilterEvents/EventRange-10 1.298 ± 7% 1.430 ± 13% +10.13% (p=0.009 n=10)
TestDB_FilterEvents/EventRangeDesc-10 1.297 ± 5% 1.408 ± 9% +8.61% (p=0.029 n=10)
TestDB_FilterTransfers/Empty_Response-10 24.30µ ± 4% 25.10µ ± 3% +3.29% (p=0.009 n=10)
TestDB_FilterTransfers/TransferCriteria-10 4.657m ± 97% 4.376m ± 98% ~ (p=0.075 n=10)
TestDB_FilterTransfers/TransferCriteriaDesc-10 4.731m ± 97% 4.469m ± 97% ~ (p=0.063 n=10)
TestDB_FilterTransfers/Ranged500K-10 1.489 ± 75% 1.610 ± 78% ~ (p=0.912 n=10)
TestDB_FilterTransfers/Ranged500KDesc-10 1.556 ± 77% 1.615 ± 78% ~ (p=0.971 n=10)
geomean 126.8m 128.8m +1.58%
│ master.txt │ pr.txt │
│ B/op │ B/op vs base │
FakeDB_NewestBlockID/newest_block_id-10 9.147Ki ± 0% 6.771Ki ± 0% -25.98% (p=0.000 n=10)
FakeDB_WriteBlocks-10 204.8Mi ± 0% 163.0Mi ± 0% -20.42% (p=0.000 n=10)
TestDB_HasBlockID-10 522.6Mi ± 0% 373.8Mi ± 0% -28.47% (p=0.000 n=10)
TestDB_FilterEvents/Empty_Response-10 3.064Ki ± 0% 2.697Ki ± 0% -11.98% (p=0.000 n=10)
TestDB_FilterEvents/AddressCriteriaFilter-10 752.5Mi ± 0% 628.3Mi ± 0% -16.51% (p=0.000 n=10)
TestDB_FilterEvents/TopicCriteriaFilter-10 755.5Mi ± 0% 630.7Mi ± 0% -16.52% (p=0.000 n=10)
TestDB_FilterEvents/EventLimit-10 785.5Mi ± 3% 657.1Mi ± 3% -16.34% (p=0.000 n=10)
TestDB_FilterEvents/EventLimitDesc-10 764.8Mi ± 6% 643.4Mi ± 5% -15.87% (p=0.000 n=10)
TestDB_FilterEvents/EventRange-10 398.0Mi ± 0% 332.9Mi ± 0% -16.37% (p=0.000 n=10)
TestDB_FilterEvents/EventRangeDesc-10 398.0Mi ± 0% 332.9Mi ± 0% -16.37% (p=0.000 n=10)
TestDB_FilterTransfers/Empty_Response-10 2.673Ki ± 0% 2.354Ki ± 0% -11.95% (p=0.000 n=10)
TestDB_FilterTransfers/TransferCriteria-10 1188.0Ki ± 96% 963.5Ki ± 96% ~ (p=0.059 n=10)
TestDB_FilterTransfers/TransferCriteriaDesc-10 1188.0Ki ± 96% 963.6Ki ± 96% ~ (p=0.060 n=10)
TestDB_FilterTransfers/Ranged500K-10 441.6Mi ± 81% 363.3Mi ± 81% ~ (p=0.063 n=10)
TestDB_FilterTransfers/Ranged500KDesc-10 441.6Mi ± 81% 363.3Mi ± 81% ~ (p=0.063 n=10)
geomean 21.63Mi 17.71Mi -18.12%
│ master.txt │ pr.txt │
│ allocs/op │ allocs/op vs base │
FakeDB_NewestBlockID/newest_block_id-10 245.0 ± 0% 149.0 ± 0% -39.18% (p=0.000 n=10)
FakeDB_WriteBlocks-10 4.348M ± 0% 2.889M ± 0% -33.56% (p=0.000 n=10)
TestDB_HasBlockID-10 19.00M ± 0% 11.00M ± 0% -42.11% (p=0.000 n=10)
TestDB_FilterEvents/Empty_Response-10 66.00 ± 0% 42.00 ± 0% -36.36% (p=0.000 n=10)
TestDB_FilterEvents/AddressCriteriaFilter-10 37.00M ± 0% 20.50M ± 0% -44.59% (p=0.000 n=10)
TestDB_FilterEvents/TopicCriteriaFilter-10 37.15M ± 0% 20.65M ± 0% -44.41% (p=0.000 n=10)
TestDB_FilterEvents/EventLimit-10 38.47M ± 3% 21.50M ± 3% -44.10% (p=0.000 n=10)
TestDB_FilterEvents/EventLimitDesc-10 35.90M ± 10% 19.77M ± 12% -44.92% (p=0.000 n=10)
TestDB_FilterEvents/EventRange-10 19.53M ± 0% 10.88M ± 0% -44.27% (p=0.000 n=10)
TestDB_FilterEvents/EventRangeDesc-10 19.53M ± 0% 10.88M ± 0% -44.27% (p=0.000 n=10)
TestDB_FilterTransfers/Empty_Response-10 58.00 ± 0% 38.00 ± 0% -34.48% (p=0.000 n=10)
TestDB_FilterTransfers/TransferCriteria-10 66.03k ± 96% 38.06k ± 96% ~ (p=0.077 n=10)
TestDB_FilterTransfers/TransferCriteriaDesc-10 66.03k ± 96% 38.06k ± 96% -42.35% (p=0.047 n=10)
TestDB_FilterTransfers/Ranged500K-10 25.20M ± 82% 14.60M ± 82% ~ (p=0.063 n=10)
TestDB_FilterTransfers/Ranged500KDesc-10 25.20M ± 82% 14.60M ± 82% ~ (p=0.059 n=10)
geomean 883.2k 516.5k -41.52%
On linux amd64, with mainnet
data
➜ benchstat master.txt pr.txt
goos: linux
goarch: amd64
pkg: github.com/vechain/thor/v2/logdb
cpu: AMD Ryzen 5 3600 6-Core Processor
│ master.txt │ pr.txt │
│ sec/op │ sec/op vs base │
FakeDB_NewestBlockID/newest_block_id-12 1064.7µ ± ∞ ¹ 342.6µ ± ∞ ¹ ~ (p=0.222 n=5)
FakeDB_WriteBlocks-12 3.084 ± ∞ ¹ 3.071 ± ∞ ¹ ~ (p=1.000 n=5)
TestDB_HasBlockID-12 5.113 ± ∞ ¹ 5.137 ± ∞ ¹ ~ (p=0.690 n=5)
TestDB_FilterEvents/Empty_Response-12 62.63µ ± ∞ ¹ 61.66µ ± ∞ ¹ -1.55% (p=0.032 n=5)
TestDB_FilterEvents/AddressCriteriaFilter-12 4.043 ± ∞ ¹ 3.982 ± ∞ ¹ -1.50% (p=0.032 n=5)
TestDB_FilterEvents/TopicCriteriaFilter-12 5.725 ± ∞ ¹ 5.488 ± ∞ ¹ -4.14% (p=0.008 n=5)
TestDB_FilterEvents/EventLimit-12 3.446 ± ∞ ¹ 3.456 ± ∞ ¹ ~ (p=0.151 n=5)
TestDB_FilterEvents/EventLimitDesc-12 3.639 ± ∞ ¹ 3.634 ± ∞ ¹ ~ (p=0.548 n=5)
TestDB_FilterEvents/EventRange-12 1.860 ± ∞ ¹ 1.996 ± ∞ ¹ +7.29% (p=0.008 n=5)
TestDB_FilterEvents/EventRangeDesc-12 1.918 ± ∞ ¹ 2.010 ± ∞ ¹ +4.79% (p=0.008 n=5)
TestDB_FilterTransfers/Empty_Response-12 44.25µ ± ∞ ¹ 43.57µ ± ∞ ¹ ~ (p=0.421 n=5)
TestDB_FilterTransfers/TransferCriteria-12 294.4µ ± ∞ ¹ 296.4µ ± ∞ ¹ ~ (p=0.310 n=5)
TestDB_FilterTransfers/TransferCriteriaDesc-12 294.4µ ± ∞ ¹ 293.6µ ± ∞ ¹ ~ (p=1.000 n=5)
TestDB_FilterTransfers/Ranged500K-12 510.1m ± ∞ ¹ 519.1m ± ∞ ¹ +1.77% (p=0.008 n=5)
TestDB_FilterTransfers/Ranged500KDesc-12 517.9m ± ∞ ¹ 521.4m ± ∞ ¹ ~ (p=0.222 n=5)
geomean 100.7m 93.70m -6.92%
¹ need >= 6 samples for confidence interval at level 0.95
│ master.txt │ pr.txt │
│ B/op │ B/op vs base │
FakeDB_NewestBlockID/newest_block_id-12 9.147Ki ± ∞ ¹ 7.773Ki ± ∞ ¹ -15.02% (p=0.008 n=5)
FakeDB_WriteBlocks-12 204.8Mi ± ∞ ¹ 178.4Mi ± ∞ ¹ -12.90% (p=0.008 n=5)
TestDB_HasBlockID-12 522.6Mi ± ∞ ¹ 446.3Mi ± ∞ ¹ -14.60% (p=0.008 n=5)
TestDB_FilterEvents/Empty_Response-12 3.064Ki ± ∞ ¹ 2.941Ki ± ∞ ¹ -4.02% (p=0.008 n=5)
TestDB_FilterEvents/AddressCriteriaFilter-12 752.5Mi ± ∞ ¹ 752.5Mi ± ∞ ¹ ~ (p=0.222 n=5)
TestDB_FilterEvents/TopicCriteriaFilter-12 757.3Mi ± ∞ ¹ 757.3Mi ± ∞ ¹ ~ (p=0.056 n=5)
TestDB_FilterEvents/EventLimit-12 807.6Mi ± ∞ ¹ 807.6Mi ± ∞ ¹ -0.00% (p=0.024 n=5)
TestDB_FilterEvents/EventLimitDesc-12 801.4Mi ± ∞ ¹ 801.4Mi ± ∞ ¹ ~ (p=0.198 n=5)
TestDB_FilterEvents/EventRange-12 397.9Mi ± ∞ ¹ 397.9Mi ± ∞ ¹ ~ (p=0.087 n=5)
TestDB_FilterEvents/EventRangeDesc-12 397.9Mi ± ∞ ¹ 397.9Mi ± ∞ ¹ ~ (p=0.341 n=5)
TestDB_FilterTransfers/Empty_Response-12 2.674Ki ± ∞ ¹ 2.549Ki ± ∞ ¹ -4.67% (p=0.008 n=5)
TestDB_FilterTransfers/TransferCriteria-12 45.94Ki ± ∞ ¹ 45.83Ki ± ∞ ¹ -0.25% (p=0.008 n=5)
TestDB_FilterTransfers/TransferCriteriaDesc-12 45.95Ki ± ∞ ¹ 45.83Ki ± ∞ ¹ -0.26% (p=0.008 n=5)
TestDB_FilterTransfers/Ranged500K-12 85.15Mi ± ∞ ¹ 85.15Mi ± ∞ ¹ ~ (p=0.548 n=5)
TestDB_FilterTransfers/Ranged500KDesc-12 85.15Mi ± ∞ ¹ 85.15Mi ± ∞ ¹ ~ (p=0.421 n=5)
geomean 11.31Mi 10.90Mi -3.62%
¹ need >= 6 samples for confidence interval at level 0.95
│ master.txt │ pr.txt │
│ allocs/op │ allocs/op vs base │
FakeDB_NewestBlockID/newest_block_id-12 245.0 ± ∞ ¹ 239.0 ± ∞ ¹ -2.45% (p=0.008 n=5)
FakeDB_WriteBlocks-12 4.348M ± ∞ ¹ 4.238M ± ∞ ¹ -2.53% (p=0.008 n=5)
TestDB_HasBlockID-12 19.00M ± ∞ ¹ 18.50M ± ∞ ¹ -2.63% (p=0.008 n=5)
TestDB_FilterEvents/Empty_Response-12 66.00 ± ∞ ¹ 65.00 ± ∞ ¹ -1.52% (p=0.008 n=5)
TestDB_FilterEvents/AddressCriteriaFilter-12 37.00M ± ∞ ¹ 37.00M ± ∞ ¹ ~ (p=0.246 n=5)
TestDB_FilterEvents/TopicCriteriaFilter-12 37.16M ± ∞ ¹ 37.16M ± ∞ ¹ ~ (p=0.079 n=5)
TestDB_FilterEvents/EventLimit-12 39.57M ± ∞ ¹ 39.57M ± ∞ ¹ -0.00% (p=0.024 n=5)
TestDB_FilterEvents/EventLimitDesc-12 38.84M ± ∞ ¹ 38.84M ± ∞ ¹ ~ (p=0.079 n=5)
TestDB_FilterEvents/EventRange-12 19.52M ± ∞ ¹ 19.52M ± ∞ ¹ -0.00% (p=0.024 n=5)
TestDB_FilterEvents/EventRangeDesc-12 19.52M ± ∞ ¹ 19.52M ± ∞ ¹ -0.00% (p=0.008 n=5)
TestDB_FilterTransfers/Empty_Response-12 58.00 ± ∞ ¹ 57.00 ± ∞ ¹ -1.72% (p=0.008 n=5)
TestDB_FilterTransfers/TransferCriteria-12 2.453k ± ∞ ¹ 2.452k ± ∞ ¹ -0.04% (p=0.008 n=5)
TestDB_FilterTransfers/TransferCriteriaDesc-12 2.453k ± ∞ ¹ 2.452k ± ∞ ¹ -0.04% (p=0.008 n=5)
TestDB_FilterTransfers/Ranged500K-12 4.653M ± ∞ ¹ 4.653M ± ∞ ¹ ~ (p=0.063 n=5)
TestDB_FilterTransfers/Ranged500KDesc-12 4.653M ± ∞ ¹ 4.653M ± ∞ ¹ -0.00% (p=0.040 n=5)
geomean 457.8k 454.4k -0.73%
¹ need >= 6 samples for confidence interval at level 0.95
On linux amd64 with testnet
data
goos: linux
goarch: amd64
pkg: github.com/vechain/thor/v2/logdb
cpu: AMD Ryzen 5 3600 6-Core Processor
│ master.txt │ pr.txt │
│ sec/op │ sec/op vs base │
FakeDB_NewestBlockID/newest_block_id-12 1071.4µ ± 67% 345.7µ ± 9% -67.73% (p=0.003 n=10)
FakeDB_WriteBlocks-12 3.074 ± 8% 3.086 ± 9% ~ (p=0.631 n=10)
TestDB_HasBlockID-12 5.199 ± 2% 5.256 ± 3% ~ (p=0.481 n=10)
TestDB_FilterEvents/Empty_Response-12 62.68µ ± 1% 62.06µ ± 2% ~ (p=0.315 n=10)
TestDB_FilterEvents/AddressCriteriaFilter-12 3.645 ± 11% 3.978 ± 19% ~ (p=0.315 n=10)
TestDB_FilterEvents/TopicCriteriaFilter-12 5.028 ± 14% 5.487 ± 23% ~ (p=0.247 n=10)
TestDB_FilterEvents/EventLimit-12 3.397 ± 2% 3.389 ± 2% ~ (p=0.971 n=10)
TestDB_FilterEvents/EventLimitDesc-12 3.835 ± 5% 3.711 ± 3% ~ (p=0.280 n=10)
TestDB_FilterEvents/EventRange-12 1.810 ± 3% 1.964 ± 2% +8.48% (p=0.000 n=10)
TestDB_FilterEvents/EventRangeDesc-12 1.888 ± 2% 1.969 ± 2% +4.32% (p=0.000 n=10)
TestDB_FilterTransfers/Empty_Response-12 44.12µ ± 1% 44.15µ ± 2% ~ (p=0.853 n=10)
TestDB_FilterTransfers/TransferCriteria-12 6.827m ± 100% 6.778m ± 97% ~ (p=0.971 n=10)
TestDB_FilterTransfers/TransferCriteriaDesc-12 6.957m ± 99% 6.856m ± 99% ~ (p=0.436 n=10)
TestDB_FilterTransfers/Ranged500K-12 2.176 ± 77% 2.331 ± 78% ~ (p=0.063 n=10)
TestDB_FilterTransfers/Ranged500KDesc-12 2.290 ± 78% 2.329 ± 79% ~ (p=0.165 n=10)
geomean 183.7m 174.2m -5.18%
│ master.txt │ pr.txt │
│ B/op │ B/op vs base │
FakeDB_NewestBlockID/newest_block_id-12 9.148Ki ± 0% 7.773Ki ± 0% -15.03% (p=0.000 n=10)
FakeDB_WriteBlocks-12 204.8Mi ± 0% 178.4Mi ± 0% -12.90% (p=0.000 n=10)
TestDB_HasBlockID-12 522.6Mi ± 0% 446.3Mi ± 0% -14.60% (p=0.000 n=10)
TestDB_FilterEvents/Empty_Response-12 3.064Ki ± 0% 2.941Ki ± 0% -4.02% (p=0.000 n=10)
TestDB_FilterEvents/AddressCriteriaFilter-12 752.5Mi ± 0% 752.5Mi ± 0% ~ (p=0.315 n=10)
TestDB_FilterEvents/TopicCriteriaFilter-12 755.5Mi ± 0% 755.5Mi ± 0% ~ (p=0.105 n=10)
TestDB_FilterEvents/EventLimit-12 785.5Mi ± 3% 785.5Mi ± 3% ~ (p=0.079 n=10)
TestDB_FilterEvents/EventLimitDesc-12 776.6Mi ± 3% 776.6Mi ± 3% ~ (p=0.160 n=10)
TestDB_FilterEvents/EventRange-12 398.0Mi ± 0% 398.0Mi ± 0% ~ (p=0.118 n=10)
TestDB_FilterEvents/EventRangeDesc-12 398.0Mi ± 0% 398.0Mi ± 0% ~ (p=0.593 n=10)
TestDB_FilterTransfers/Empty_Response-12 2.674Ki ± 0% 2.549Ki ± 0% -4.67% (p=0.000 n=10)
TestDB_FilterTransfers/TransferCriteria-12 1.161Mi ± 96% 1.161Mi ± 96% ~ (p=0.183 n=10)
TestDB_FilterTransfers/TransferCriteriaDesc-12 1.161Mi ± 96% 1.161Mi ± 96% ~ (p=0.468 n=10)
TestDB_FilterTransfers/Ranged500K-12 441.6Mi ± 81% 441.6Mi ± 81% ~ (p=0.869 n=10)
TestDB_FilterTransfers/Ranged500KDesc-12 441.6Mi ± 81% 441.6Mi ± 81% ~ (p=0.853 n=10)
geomean 21.66Mi 20.88Mi -3.59%
│ master.txt │ pr.txt │
│ allocs/op │ allocs/op vs base │
FakeDB_NewestBlockID/newest_block_id-12 245.0 ± 0% 239.0 ± 0% -2.45% (p=0.000 n=10)
FakeDB_WriteBlocks-12 4.348M ± 0% 4.238M ± 0% -2.53% (p=0.000 n=10)
TestDB_HasBlockID-12 19.00M ± 0% 18.50M ± 0% -2.63% (p=0.000 n=10)
TestDB_FilterEvents/Empty_Response-12 66.00 ± 0% 65.00 ± 0% -1.52% (p=0.000 n=10)
TestDB_FilterEvents/AddressCriteriaFilter-12 37.00M ± 0% 37.00M ± 0% ~ (p=0.170 n=10)
TestDB_FilterEvents/TopicCriteriaFilter-12 37.15M ± 0% 37.15M ± 0% ~ (p=0.098 n=10)
TestDB_FilterEvents/EventLimit-12 38.47M ± 3% 38.47M ± 3% ~ (p=0.078 n=10)
TestDB_FilterEvents/EventLimitDesc-12 37.61M ± 3% 37.61M ± 3% ~ (p=0.108 n=10)
TestDB_FilterEvents/EventRange-12 19.53M ± 0% 19.53M ± 0% ~ (p=0.339 n=10)
TestDB_FilterEvents/EventRangeDesc-12 19.53M ± 0% 19.53M ± 0% ~ (p=0.085 n=10)
TestDB_FilterTransfers/Empty_Response-12 58.00 ± 0% 57.00 ± 0% -1.72% (p=0.000 n=10)
TestDB_FilterTransfers/TransferCriteria-12 66.09k ± 96% 66.09k ± 96% ~ (p=0.134 n=10)
TestDB_FilterTransfers/TransferCriteriaDesc-12 66.09k ± 96% 66.09k ± 96% ~ (p=0.193 n=10)
TestDB_FilterTransfers/Ranged500K-12 25.20M ± 82% 25.20M ± 82% ~ (p=0.382 n=10)
TestDB_FilterTransfers/Ranged500KDesc-12 25.20M ± 82% 25.20M ± 82% ~ (p=0.344 n=10)
geomean 886.1k 879.6k -0.73%
@claytonneal The command I have used for the benchmark
go test -bench="^Benchmark" -benchmem -count=5 github.com/vechain/thor/v2/logdb -dbPath <path-to-logs.db> |tee -a master.txt
go test -bench="^Benchmark" -benchmem -count=5 github.com/vechain/thor/v2/logdb -dbPath <path-to-logs.db> |tee -a pr.txt
benchstat maser.txt pr.txt
There are my results for the mainnet data
goos: linux
goarch: arm64
pkg: github.com/vechain/thor/v2/logdb
│ master_mainnet.txt │ pr_mainnet.txt │
│ sec/op │ sec/op vs base │
FakeDB_NewestBlockID/newest_block_id-10 218.9µ ± ∞ ¹ 219.3µ ± ∞ ¹ ~ (p=1.000 n=5)
FakeDB_WriteBlocks/repeated_writes-10 6.703 ± ∞ ¹ 6.114 ± ∞ ¹ ~ (p=0.548 n=5)
FakeDB_WriteBlocks/batched_writes-10 2.290 ± ∞ ¹ 2.210 ± ∞ ¹ ~ (p=0.310 n=5)
TestDB_HasBlockID-10 10.62 ± ∞ ¹ 10.85 ± ∞ ¹ ~ (p=0.548 n=5)
TestDB_FilterEvents/AddressCriteriaFilter-10 2.823 ± ∞ ¹ 3.337 ± ∞ ¹ ~ (p=0.548 n=5)
TestDB_FilterEvents/TopicCriteriaFilter-10 4.072 ± ∞ ¹ 3.925 ± ∞ ¹ ~ (p=0.421 n=5)
TestDB_FilterEvents/EventLimit-10 2.359 ± ∞ ¹ 2.126 ± ∞ ¹ ~ (p=0.095 n=5)
TestDB_FilterEvents/EventLimitDesc-10 2.396 ± ∞ ¹ 2.178 ± ∞ ¹ ~ (p=0.095 n=5)
TestDB_FilterEvents/EventRange-10 1.385 ± ∞ ¹ 1.255 ± ∞ ¹ ~ (p=0.222 n=5)
TestDB_FilterEvents/EventRangeDesc-10 1.368 ± ∞ ¹ 1.228 ± ∞ ¹ -10.29% (p=0.008 n=5)
TestDB_FilterTransfers/TransferCriteria-10 186.6µ ± ∞ ¹ 174.0µ ± ∞ ¹ -6.74% (p=0.008 n=5)
TestDB_FilterTransfers/TransferCriteriaDesc-10 187.8µ ± ∞ ¹ 175.3µ ± ∞ ¹ -6.66% (p=0.008 n=5)
TestDB_FilterTransfers/Ranged500K-10 352.5m ± ∞ ¹ 333.5m ± ∞ ¹ ~ (p=0.095 n=5)
TestDB_FilterTransfers/Ranged500KDesc-10 349.4m ± ∞ ¹ 328.6m ± ∞ ¹ -5.95% (p=0.008 n=5)
geomean 280.8m 268.4m -4.44%
¹ need >= 6 samples for confidence interval at level 0.95
│ master_mainnet.txt │ pr_mainnet.txt │
│ B/op │ B/op vs base │
FakeDB_NewestBlockID/newest_block_id-10 9.172Ki ± ∞ ¹ 6.766Ki ± ∞ ¹ -26.24% (p=0.008 n=5)
FakeDB_WriteBlocks/repeated_writes-10 202.7Mi ± ∞ ¹ 159.1Mi ± ∞ ¹ -21.52% (p=0.008 n=5)
FakeDB_WriteBlocks/batched_writes-10 197.6Mi ± ∞ ¹ 155.6Mi ± ∞ ¹ -21.25% (p=0.008 n=5)
TestDB_HasBlockID-10 515.0Mi ± ∞ ¹ 373.8Mi ± ∞ ¹ -27.41% (p=0.008 n=5)
TestDB_FilterEvents/AddressCriteriaFilter-10 752.5Mi ± ∞ ¹ 628.3Mi ± ∞ ¹ -16.51% (p=0.008 n=5)
TestDB_FilterEvents/TopicCriteriaFilter-10 757.3Mi ± ∞ ¹ 633.0Mi ± ∞ ¹ -16.41% (p=0.008 n=5)
TestDB_FilterEvents/EventLimit-10 807.6Mi ± ∞ ¹ 676.6Mi ± ∞ ¹ -16.22% (p=0.008 n=5)
TestDB_FilterEvents/EventLimitDesc-10 814.0Mi ± ∞ ¹ 682.8Mi ± ∞ ¹ -16.12% (p=0.008 n=5)
TestDB_FilterEvents/EventRange-10 397.9Mi ± ∞ ¹ 333.0Mi ± ∞ ¹ -16.31% (p=0.008 n=5)
TestDB_FilterEvents/EventRangeDesc-10 397.9Mi ± ∞ ¹ 333.0Mi ± ∞ ¹ -16.31% (p=0.008 n=5)
TestDB_FilterTransfers/TransferCriteria-10 45.95Ki ± ∞ ¹ 37.75Ki ± ∞ ¹ -17.84% (p=0.008 n=5)
TestDB_FilterTransfers/TransferCriteriaDesc-10 45.95Ki ± ∞ ¹ 37.75Ki ± ∞ ¹ -17.85% (p=0.008 n=5)
TestDB_FilterTransfers/Ranged500K-10 85.15Mi ± ∞ ¹ 70.45Mi ± ∞ ¹ -17.27% (p=0.008 n=5)
TestDB_FilterTransfers/Ranged500KDesc-10 85.15Mi ± ∞ ¹ 70.45Mi ± ∞ ¹ -17.27% (p=0.008 n=5)
geomean 45.44Mi 36.81Mi -18.98%
¹ need >= 6 samples for confidence interval at level 0.95
│ master_mainnet.txt │ pr_mainnet.txt │
│ allocs/op │ allocs/op vs base │
FakeDB_NewestBlockID/newest_block_id-10 248.0 ± ∞ ¹ 149.0 ± ∞ ¹ -39.92% (p=0.008 n=5)
FakeDB_WriteBlocks/repeated_writes-10 4.709M ± ∞ ¹ 3.118M ± ∞ ¹ -33.77% (p=0.008 n=5)
FakeDB_WriteBlocks/batched_writes-10 4.347M ± ∞ ¹ 2.887M ± ∞ ¹ -33.59% (p=0.008 n=5)
TestDB_HasBlockID-10 19.00M ± ∞ ¹ 11.00M ± ∞ ¹ -42.11% (p=0.008 n=5)
TestDB_FilterEvents/AddressCriteriaFilter-10 37.00M ± ∞ ¹ 20.50M ± ∞ ¹ -44.59% (p=0.008 n=5)
TestDB_FilterEvents/TopicCriteriaFilter-10 37.16M ± ∞ ¹ 20.66M ± ∞ ¹ -44.41% (p=0.008 n=5)
TestDB_FilterEvents/EventLimit-10 39.57M ± ∞ ¹ 22.23M ± ∞ ¹ -43.83% (p=0.008 n=5)
TestDB_FilterEvents/EventLimitDesc-10 39.73M ± ∞ ¹ 22.32M ± ∞ ¹ -43.82% (p=0.008 n=5)
TestDB_FilterEvents/EventRange-10 19.52M ± ∞ ¹ 10.91M ± ∞ ¹ -44.13% (p=0.008 n=5)
TestDB_FilterEvents/EventRangeDesc-10 19.52M ± ∞ ¹ 10.91M ± ∞ ¹ -44.13% (p=0.008 n=5)
TestDB_FilterTransfers/TransferCriteria-10 2.454k ± ∞ ¹ 1.424k ± ∞ ¹ -41.97% (p=0.008 n=5)
TestDB_FilterTransfers/TransferCriteriaDesc-10 2.454k ± ∞ ¹ 1.424k ± ∞ ¹ -41.97% (p=0.008 n=5)
TestDB_FilterTransfers/Ranged500K-10 4.653M ± ∞ ¹ 2.686M ± ∞ ¹ -42.29% (p=0.008 n=5)
TestDB_FilterTransfers/Ranged500KDesc-10 4.653M ± ∞ ¹ 2.686M ± ∞ ¹ -42.29% (p=0.008 n=5)
geomean 1.936M 1.128M -41.73%
¹ need >= 6 samples for confidence interval at level 0.95
And testnet data
goos: linux
goarch: arm64
pkg: github.com/vechain/thor/v2/logdb
│ master_testnet.txt │ pr_testnet.txt │
│ sec/op │ sec/op vs base │
FakeDB_NewestBlockID/newest_block_id-10 219.5µ ± ∞ ¹ 219.6µ ± ∞ ¹ ~ (p=0.841 n=5)
FakeDB_WriteBlocks/repeated_writes-10 5.723 ± ∞ ¹ 7.004 ± ∞ ¹ ~ (p=0.548 n=5)
FakeDB_WriteBlocks/batched_writes-10 2.256 ± ∞ ¹ 2.267 ± ∞ ¹ ~ (p=0.841 n=5)
TestDB_HasBlockID-10 12.25 ± ∞ ¹ 11.89 ± ∞ ¹ ~ (p=0.095 n=5)
TestDB_FilterEvents/AddressCriteriaFilter-10 2.114 ± ∞ ¹ 2.033 ± ∞ ¹ ~ (p=0.095 n=5)
TestDB_FilterEvents/TopicCriteriaFilter-10 3.037 ± ∞ ¹ 2.603 ± ∞ ¹ ~ (p=0.151 n=5)
TestDB_FilterEvents/EventLimit-10 2.421 ± ∞ ¹ 2.014 ± ∞ ¹ -16.83% (p=0.008 n=5)
TestDB_FilterEvents/EventLimitDesc-10 2.640 ± ∞ ¹ 2.507 ± ∞ ¹ ~ (p=0.151 n=5)
TestDB_FilterEvents/EventRange-10 1.186 ± ∞ ¹ 1.181 ± ∞ ¹ ~ (p=0.548 n=5)
TestDB_FilterEvents/EventRangeDesc-10 1.239 ± ∞ ¹ 1.188 ± ∞ ¹ -4.09% (p=0.008 n=5)
TestDB_FilterTransfers/TransferCriteria-10 8.790m ± ∞ ¹ 8.752m ± ∞ ¹ ~ (p=0.690 n=5)
TestDB_FilterTransfers/TransferCriteriaDesc-10 8.968m ± ∞ ¹ 8.334m ± ∞ ¹ ~ (p=0.056 n=5)
TestDB_FilterTransfers/Ranged500K-10 2.685 ± ∞ ¹ 2.545 ± ∞ ¹ ~ (p=0.222 n=5)
TestDB_FilterTransfers/Ranged500KDesc-10 2.677 ± ∞ ¹ 2.538 ± ∞ ¹ -5.16% (p=0.008 n=5)
geomean 618.0m 597.1m -3.39%
¹ need >= 6 samples for confidence interval at level 0.95
│ master_testnet.txt │ pr_testnet.txt │
│ B/op │ B/op vs base │
FakeDB_NewestBlockID/newest_block_id-10 9.174Ki ± ∞ ¹ 6.767Ki ± ∞ ¹ -26.24% (p=0.008 n=5)
FakeDB_WriteBlocks/repeated_writes-10 202.6Mi ± ∞ ¹ 159.0Mi ± ∞ ¹ -21.51% (p=0.008 n=5)
FakeDB_WriteBlocks/batched_writes-10 197.6Mi ± ∞ ¹ 155.6Mi ± ∞ ¹ -21.25% (p=0.008 n=5)
TestDB_HasBlockID-10 515.0Mi ± ∞ ¹ 373.8Mi ± ∞ ¹ -27.41% (p=0.008 n=5)
TestDB_FilterEvents/AddressCriteriaFilter-10 752.5Mi ± ∞ ¹ 628.3Mi ± ∞ ¹ -16.51% (p=0.008 n=5)
TestDB_FilterEvents/TopicCriteriaFilter-10 753.7Mi ± ∞ ¹ 628.3Mi ± ∞ ¹ -16.64% (p=0.008 n=5)
TestDB_FilterEvents/EventLimit-10 763.4Mi ± ∞ ¹ 637.7Mi ± ∞ ¹ -16.47% (p=0.008 n=5)
TestDB_FilterEvents/EventLimitDesc-10 757.1Mi ± ∞ ¹ 634.8Mi ± ∞ ¹ -16.15% (p=0.008 n=5)
TestDB_FilterEvents/EventRange-10 398.2Mi ± ∞ ¹ 332.8Mi ± ∞ ¹ -16.43% (p=0.008 n=5)
TestDB_FilterEvents/EventRangeDesc-10 398.2Mi ± ∞ ¹ 332.8Mi ± ∞ ¹ -16.43% (p=0.008 n=5)
TestDB_FilterTransfers/TransferCriteria-10 2.278Mi ± ∞ ¹ 1.847Mi ± ∞ ¹ -18.92% (p=0.008 n=5)
TestDB_FilterTransfers/TransferCriteriaDesc-10 2.278Mi ± ∞ ¹ 1.847Mi ± ∞ ¹ -18.92% (p=0.008 n=5)
TestDB_FilterTransfers/Ranged500K-10 798.1Mi ± ∞ ¹ 656.1Mi ± ∞ ¹ -17.79% (p=0.008 n=5)
TestDB_FilterTransfers/Ranged500KDesc-10 798.1Mi ± ∞ ¹ 656.1Mi ± ∞ ¹ -17.79% (p=0.008 n=5)
geomean 108.6Mi 87.68Mi -19.26%
¹ need >= 6 samples for confidence interval at level 0.95
│ master_testnet.txt │ pr_testnet.txt │
│ allocs/op │ allocs/op vs base │
FakeDB_NewestBlockID/newest_block_id-10 248.0 ± ∞ ¹ 149.0 ± ∞ ¹ -39.92% (p=0.008 n=5)
FakeDB_WriteBlocks/repeated_writes-10 4.708M ± ∞ ¹ 3.118M ± ∞ ¹ -33.77% (p=0.008 n=5)
FakeDB_WriteBlocks/batched_writes-10 4.347M ± ∞ ¹ 2.887M ± ∞ ¹ -33.59% (p=0.008 n=5)
TestDB_HasBlockID-10 19.00M ± ∞ ¹ 11.00M ± ∞ ¹ -42.11% (p=0.008 n=5)
TestDB_FilterEvents/AddressCriteriaFilter-10 37.00M ± ∞ ¹ 20.50M ± ∞ ¹ -44.59% (p=0.008 n=5)
TestDB_FilterEvents/TopicCriteriaFilter-10 37.15M ± ∞ ¹ 20.65M ± ∞ ¹ -44.42% (p=0.008 n=5)
TestDB_FilterEvents/EventLimit-10 37.36M ± ∞ ¹ 20.78M ± ∞ ¹ -44.39% (p=0.008 n=5)
TestDB_FilterEvents/EventLimitDesc-10 36.25M ± ∞ ¹ 20.02M ± ∞ ¹ -44.79% (p=0.008 n=5)
TestDB_FilterEvents/EventRange-10 19.54M ± ∞ ¹ 10.86M ± ∞ ¹ -44.42% (p=0.008 n=5)
TestDB_FilterEvents/EventRangeDesc-10 19.54M ± ∞ ¹ 10.86M ± ∞ ¹ -44.42% (p=0.008 n=5)
TestDB_FilterTransfers/TransferCriteria-10 129.73k ± ∞ ¹ 74.77k ± ∞ ¹ -42.36% (p=0.008 n=5)
TestDB_FilterTransfers/TransferCriteriaDesc-10 129.73k ± ∞ ¹ 74.77k ± ∞ ¹ -42.36% (p=0.008 n=5)
TestDB_FilterTransfers/Ranged500K-10 45.75M ± ∞ ¹ 26.51M ± ∞ ¹ -42.04% (p=0.008 n=5)
TestDB_FilterTransfers/Ranged500KDesc-10 45.75M ± ∞ ¹ 26.51M ± ∞ ¹ -42.04% (p=0.008 n=5)
geomean 4.679M 2.718M -41.91%
¹ need >= 6 samples for confidence interval at level 0.95
And the raw results: master_mainnet.txt master_testnet.txt pr_mainnet.txt pr_testnet.txt
Description
This PR is an update to https://github.com/vechain/thor/pull/775
Upgrades the minimum version of go from 1.21 to the latest stable version which is 1.22.4. Upgrades Sqlite3 version from 3.41 to 3.45 Adds logdb benchmarks.
Upgrade Golang + Golangci-lint
Upgrades all golang usage to 1.22 and the linter to 1.59.0. It's possible to upgrade golang usage to 1.22 and the
linter to 1.59.1
by doing the following these commands:Fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist: