Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: migrate flare unit tests to vitest #6215

Merged
merged 1 commit into from
Dec 21, 2023
Merged

Conversation

nazarhussain
Copy link
Contributor

@nazarhussain nazarhussain commented Dec 20, 2023

Motivation

Consolidate the testing frameworks and migrate to vitest.

Description

Migrate flare unit tests to vitest.

Steps to test or reproduce

  • Run all tests

@nazarhussain nazarhussain requested a review from a team as a code owner December 20, 2023 18:45
Copy link

codecov bot commented Dec 20, 2023

Codecov Report

Merging #6215 (1417da1) into unstable (6d1dc61) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #6215   +/-   ##
=========================================
  Coverage     85.63%   85.63%           
=========================================
  Files           172      172           
  Lines         14372    14372           
  Branches        880      880           
=========================================
  Hits          12308    12308           
  Misses         2041     2041           
  Partials         23       23           

Copy link
Contributor

⚠️ Performance Alert ⚠️

Possible performance regression was detected for some benchmarks.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold.

Benchmark suite Current: bee890c Previous: 6d1dc61 Ratio
pickEth1Vote - no votes 10.155 ms/op 1.3629 ms/op 7.45
Full benchmark results
Benchmark suite Current: bee890c Previous: 6d1dc61 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 695.27 us/op 477.06 us/op 1.46
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 84.305 us/op 85.441 us/op 0.99
BLS verify - blst-native 1.3458 ms/op 1.3061 ms/op 1.03
BLS verifyMultipleSignatures 3 - blst-native 2.8132 ms/op 2.7523 ms/op 1.02
BLS verifyMultipleSignatures 8 - blst-native 6.1847 ms/op 6.1292 ms/op 1.01
BLS verifyMultipleSignatures 32 - blst-native 22.549 ms/op 22.356 ms/op 1.01
BLS verifyMultipleSignatures 64 - blst-native 44.464 ms/op 44.101 ms/op 1.01
BLS verifyMultipleSignatures 128 - blst-native 88.220 ms/op 86.021 ms/op 1.03
BLS deserializing 10000 signatures 956.03 ms/op 942.18 ms/op 1.01
BLS deserializing 100000 signatures 9.2909 s/op 9.4869 s/op 0.98
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.3871 ms/op 1.3654 ms/op 1.02
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.5636 ms/op 1.5460 ms/op 1.01
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.4123 ms/op 3.4229 ms/op 0.70
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.6013 ms/op 3.6201 ms/op 0.99
BLS verifyMultipleSignatures - same message - 128 - blst-native 6.1946 ms/op 8.2203 ms/op 0.75
BLS aggregatePubkeys 32 - blst-native 27.969 us/op 28.839 us/op 0.97
BLS aggregatePubkeys 128 - blst-native 111.12 us/op 106.33 us/op 1.05
getAttestationsForBlock 50.428 ms/op 63.800 ms/op 0.79
getSlashingsAndExits - default max 187.07 us/op 184.97 us/op 1.01
getSlashingsAndExits - 2k 574.49 us/op 609.71 us/op 0.94
proposeBlockBody type=full, size=empty 5.5070 ms/op 5.1596 ms/op 1.07
isKnown best case - 1 super set check 324.00 ns/op 322.00 ns/op 1.01
isKnown normal case - 2 super set checks 331.00 ns/op 320.00 ns/op 1.03
isKnown worse case - 16 super set checks 315.00 ns/op 314.00 ns/op 1.00
CheckpointStateCache - add get delete 5.3520 us/op 6.2910 us/op 0.85
validate api signedAggregateAndProof - struct 2.8638 ms/op 2.8432 ms/op 1.01
validate gossip signedAggregateAndProof - struct 2.8642 ms/op 2.8490 ms/op 1.01
validate gossip attestation - vc 640000 1.4481 ms/op 1.4318 ms/op 1.01
batch validate gossip attestation - vc 640000 - chunk 32 170.55 us/op 174.64 us/op 0.98
batch validate gossip attestation - vc 640000 - chunk 64 148.28 us/op 187.19 us/op 0.79
batch validate gossip attestation - vc 640000 - chunk 128 142.79 us/op 163.44 us/op 0.87
batch validate gossip attestation - vc 640000 - chunk 256 145.41 us/op 142.80 us/op 1.02
pickEth1Vote - no votes 10.155 ms/op 1.3629 ms/op 7.45
pickEth1Vote - max votes 11.335 ms/op 12.663 ms/op 0.90
pickEth1Vote - Eth1Data hashTreeRoot value x2048 23.219 ms/op 22.618 ms/op 1.03
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 36.604 ms/op 28.098 ms/op 1.30
pickEth1Vote - Eth1Data fastSerialize value x2048 674.31 us/op 773.62 us/op 0.87
pickEth1Vote - Eth1Data fastSerialize tree x2048 8.0998 ms/op 5.1535 ms/op 1.57
bytes32 toHexString 565.00 ns/op 622.00 ns/op 0.91
bytes32 Buffer.toString(hex) 309.00 ns/op 308.00 ns/op 1.00
bytes32 Buffer.toString(hex) from Uint8Array 456.00 ns/op 537.00 ns/op 0.85
bytes32 Buffer.toString(hex) + 0x 299.00 ns/op 323.00 ns/op 0.93
Object access 1 prop 0.16600 ns/op 0.19200 ns/op 0.86
Map access 1 prop 0.15700 ns/op 0.14600 ns/op 1.08
Object get x1000 8.0600 ns/op 7.0620 ns/op 1.14
Map get x1000 0.85200 ns/op 0.83900 ns/op 1.02
Object set x1000 53.482 ns/op 61.327 ns/op 0.87
Map set x1000 42.492 ns/op 50.037 ns/op 0.85
Return object 10000 times 0.26730 ns/op 0.24570 ns/op 1.09
Throw Error 10000 times 4.6088 us/op 4.1298 us/op 1.12
fastMsgIdFn sha256 / 200 bytes 3.6790 us/op 3.4300 us/op 1.07
fastMsgIdFn h32 xxhash / 200 bytes 326.00 ns/op 341.00 ns/op 0.96
fastMsgIdFn h64 xxhash / 200 bytes 399.00 ns/op 384.00 ns/op 1.04
fastMsgIdFn sha256 / 1000 bytes 12.745 us/op 11.927 us/op 1.07
fastMsgIdFn h32 xxhash / 1000 bytes 451.00 ns/op 475.00 ns/op 0.95
fastMsgIdFn h64 xxhash / 1000 bytes 453.00 ns/op 468.00 ns/op 0.97
fastMsgIdFn sha256 / 10000 bytes 114.50 us/op 105.40 us/op 1.09
fastMsgIdFn h32 xxhash / 10000 bytes 2.1450 us/op 1.9800 us/op 1.08
fastMsgIdFn h64 xxhash / 10000 bytes 1.5190 us/op 1.3670 us/op 1.11
send data - 1000 256B messages 23.194 ms/op 20.883 ms/op 1.11
send data - 1000 512B messages 33.042 ms/op 28.669 ms/op 1.15
send data - 1000 1024B messages 49.756 ms/op 43.133 ms/op 1.15
send data - 1000 1200B messages 48.262 ms/op 39.017 ms/op 1.24
send data - 1000 2048B messages 49.634 ms/op 46.233 ms/op 1.07
send data - 1000 4096B messages 45.335 ms/op 42.571 ms/op 1.06
send data - 1000 16384B messages 134.76 ms/op 125.18 ms/op 1.08
send data - 1000 65536B messages 531.02 ms/op 471.39 ms/op 1.13
enrSubnets - fastDeserialize 64 bits 1.5180 us/op 1.2250 us/op 1.24
enrSubnets - ssz BitVector 64 bits 514.00 ns/op 406.00 ns/op 1.27
enrSubnets - fastDeserialize 4 bits 201.00 ns/op 161.00 ns/op 1.25
enrSubnets - ssz BitVector 4 bits 506.00 ns/op 409.00 ns/op 1.24
prioritizePeers score -10:0 att 32-0.1 sync 2-0 128.71 us/op 101.50 us/op 1.27
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 152.23 us/op 126.45 us/op 1.20
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 200.17 us/op 164.05 us/op 1.22
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 348.74 us/op 301.89 us/op 1.16
prioritizePeers score 0:0 att 64-1 sync 4-1 399.54 us/op 374.16 us/op 1.07
array of 16000 items push then shift 1.8277 us/op 1.6712 us/op 1.09
LinkedList of 16000 items push then shift 10.477 ns/op 8.9480 ns/op 1.17
array of 16000 items push then pop 112.59 ns/op 102.48 ns/op 1.10
LinkedList of 16000 items push then pop 10.078 ns/op 9.0580 ns/op 1.11
array of 24000 items push then shift 2.6981 us/op 2.4286 us/op 1.11
LinkedList of 24000 items push then shift 9.9100 ns/op 9.1320 ns/op 1.09
array of 24000 items push then pop 154.45 ns/op 139.60 ns/op 1.11
LinkedList of 24000 items push then pop 9.6720 ns/op 8.8290 ns/op 1.10
intersect bitArray bitLen 8 7.1630 ns/op 6.7790 ns/op 1.06
intersect array and set length 8 72.524 ns/op 65.353 ns/op 1.11
intersect bitArray bitLen 128 38.466 ns/op 35.439 ns/op 1.09
intersect array and set length 128 1.0112 us/op 876.97 ns/op 1.15
bitArray.getTrueBitIndexes() bitLen 128 1.9090 us/op 1.4800 us/op 1.29
bitArray.getTrueBitIndexes() bitLen 248 3.3470 us/op 2.6880 us/op 1.25
bitArray.getTrueBitIndexes() bitLen 512 6.1270 us/op 4.9400 us/op 1.24
Buffer.concat 32 items 1.2530 us/op 958.00 ns/op 1.31
Uint8Array.set 32 items 2.7380 us/op 1.7480 us/op 1.57
Set add up to 64 items then delete first 5.0719 us/op 4.3900 us/op 1.16
OrderedSet add up to 64 items then delete first 6.5557 us/op 5.4993 us/op 1.19
Set add up to 64 items then delete last 5.3382 us/op 4.6051 us/op 1.16
OrderedSet add up to 64 items then delete last 6.8411 us/op 5.7723 us/op 1.19
Set add up to 64 items then delete middle 5.5512 us/op 4.6056 us/op 1.21
OrderedSet add up to 64 items then delete middle 9.0855 us/op 7.6316 us/op 1.19
Set add up to 128 items then delete first 11.442 us/op 9.3975 us/op 1.22
OrderedSet add up to 128 items then delete first 14.796 us/op 12.052 us/op 1.23
Set add up to 128 items then delete last 11.884 us/op 9.0872 us/op 1.31
OrderedSet add up to 128 items then delete last 16.667 us/op 11.612 us/op 1.44
Set add up to 128 items then delete middle 12.398 us/op 9.0175 us/op 1.37
OrderedSet add up to 128 items then delete middle 22.345 us/op 17.378 us/op 1.29
Set add up to 256 items then delete first 25.555 us/op 18.308 us/op 1.40
OrderedSet add up to 256 items then delete first 35.611 us/op 25.208 us/op 1.41
Set add up to 256 items then delete last 23.940 us/op 18.327 us/op 1.31
OrderedSet add up to 256 items then delete last 31.344 us/op 24.033 us/op 1.30
Set add up to 256 items then delete middle 25.443 us/op 18.729 us/op 1.36
OrderedSet add up to 256 items then delete middle 59.798 us/op 46.639 us/op 1.28
transfer serialized Status (84 B) 2.4310 us/op 1.8300 us/op 1.33
copy serialized Status (84 B) 2.0910 us/op 1.5300 us/op 1.37
transfer serialized SignedVoluntaryExit (112 B) 2.6830 us/op 1.8290 us/op 1.47
copy serialized SignedVoluntaryExit (112 B) 2.1250 us/op 1.4770 us/op 1.44
transfer serialized ProposerSlashing (416 B) 3.2910 us/op 1.9540 us/op 1.68
copy serialized ProposerSlashing (416 B) 3.3630 us/op 1.8490 us/op 1.82
transfer serialized Attestation (485 B) 3.3740 us/op 2.7240 us/op 1.24
copy serialized Attestation (485 B) 3.5060 us/op 1.9560 us/op 1.79
transfer serialized AttesterSlashing (33232 B) 3.4070 us/op 2.2170 us/op 1.54
copy serialized AttesterSlashing (33232 B) 9.4430 us/op 5.6350 us/op 1.68
transfer serialized Small SignedBeaconBlock (128000 B) 3.5910 us/op 2.5720 us/op 1.40
copy serialized Small SignedBeaconBlock (128000 B) 21.756 us/op 17.332 us/op 1.26
transfer serialized Avg SignedBeaconBlock (200000 B) 4.6940 us/op 2.9370 us/op 1.60
copy serialized Avg SignedBeaconBlock (200000 B) 31.072 us/op 22.174 us/op 1.40
transfer serialized BlobsSidecar (524380 B) 4.7830 us/op 2.9330 us/op 1.63
copy serialized BlobsSidecar (524380 B) 135.16 us/op 98.144 us/op 1.38
transfer serialized Big SignedBeaconBlock (1000000 B) 4.8570 us/op 3.6200 us/op 1.34
copy serialized Big SignedBeaconBlock (1000000 B) 187.84 us/op 166.44 us/op 1.13
pass gossip attestations to forkchoice per slot 4.9091 ms/op 4.5102 ms/op 1.09
forkChoice updateHead vc 100000 bc 64 eq 0 1.0197 ms/op 729.77 us/op 1.40
forkChoice updateHead vc 600000 bc 64 eq 0 8.1522 ms/op 5.1815 ms/op 1.57
forkChoice updateHead vc 1000000 bc 64 eq 0 10.133 ms/op 7.1304 ms/op 1.42
forkChoice updateHead vc 600000 bc 320 eq 0 5.2026 ms/op 4.3376 ms/op 1.20
forkChoice updateHead vc 600000 bc 1200 eq 0 5.7657 ms/op 4.4175 ms/op 1.31
forkChoice updateHead vc 600000 bc 7200 eq 0 8.2308 ms/op 5.2179 ms/op 1.58
forkChoice updateHead vc 600000 bc 64 eq 1000 14.329 ms/op 11.418 ms/op 1.25
forkChoice updateHead vc 600000 bc 64 eq 10000 15.001 ms/op 12.130 ms/op 1.24
forkChoice updateHead vc 600000 bc 64 eq 300000 19.412 ms/op 15.993 ms/op 1.21
computeDeltas 500000 validators 300 proto nodes 8.6082 ms/op 6.8080 ms/op 1.26
computeDeltas 500000 validators 1200 proto nodes 8.6691 ms/op 6.7258 ms/op 1.29
computeDeltas 500000 validators 7200 proto nodes 8.6003 ms/op 6.6348 ms/op 1.30
computeDeltas 750000 validators 300 proto nodes 12.640 ms/op 10.297 ms/op 1.23
computeDeltas 750000 validators 1200 proto nodes 13.122 ms/op 10.017 ms/op 1.31
computeDeltas 750000 validators 7200 proto nodes 12.672 ms/op 10.345 ms/op 1.22
computeDeltas 1400000 validators 300 proto nodes 26.697 ms/op 25.738 ms/op 1.04
computeDeltas 1400000 validators 1200 proto nodes 27.626 ms/op 19.752 ms/op 1.40
computeDeltas 1400000 validators 7200 proto nodes 33.142 ms/op 20.283 ms/op 1.63
computeDeltas 2100000 validators 300 proto nodes 60.017 ms/op 29.409 ms/op 2.04
computeDeltas 2100000 validators 1200 proto nodes 56.688 ms/op 29.607 ms/op 1.91
computeDeltas 2100000 validators 7200 proto nodes 69.140 ms/op 30.475 ms/op 2.27
computeProposerBoostScoreFromBalances 500000 validators 9.0237 ms/op 4.1322 ms/op 2.18
computeProposerBoostScoreFromBalances 750000 validators 7.7917 ms/op 3.9190 ms/op 1.99
computeProposerBoostScoreFromBalances 1400000 validators 7.1699 ms/op 3.8170 ms/op 1.88
computeProposerBoostScoreFromBalances 2100000 validators 7.5085 ms/op 3.9122 ms/op 1.92
altair processAttestation - 250000 vs - 7PWei normalcase 4.8100 ms/op 3.9577 ms/op 1.22
altair processAttestation - 250000 vs - 7PWei worstcase 8.4068 ms/op 5.1160 ms/op 1.64
altair processAttestation - setStatus - 1/6 committees join 423.29 us/op 219.97 us/op 1.92
altair processAttestation - setStatus - 1/3 committees join 885.68 us/op 390.65 us/op 2.27
altair processAttestation - setStatus - 1/2 committees join 990.65 us/op 548.78 us/op 1.81
altair processAttestation - setStatus - 2/3 committees join 1.0456 ms/op 696.29 us/op 1.50
altair processAttestation - setStatus - 4/5 committees join 1.9790 ms/op 863.14 us/op 2.29
altair processAttestation - setStatus - 100% committees join 1.9333 ms/op 1.1470 ms/op 1.69
altair processBlock - 250000 vs - 7PWei normalcase 18.397 ms/op 11.988 ms/op 1.53
altair processBlock - 250000 vs - 7PWei normalcase hashState 60.394 ms/op 44.336 ms/op 1.36
altair processBlock - 250000 vs - 7PWei worstcase 75.958 ms/op 41.404 ms/op 1.83
altair processBlock - 250000 vs - 7PWei worstcase hashState 241.35 ms/op 105.32 ms/op 2.29
phase0 processBlock - 250000 vs - 7PWei normalcase 6.5716 ms/op 3.0582 ms/op 2.15
phase0 processBlock - 250000 vs - 7PWei worstcase 83.205 ms/op 33.862 ms/op 2.46
altair processEth1Data - 250000 vs - 7PWei normalcase 1.3178 ms/op 777.41 us/op 1.70
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 21.048 us/op 12.498 us/op 1.68
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 79.336 us/op 91.770 us/op 0.86
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 44.174 us/op 24.942 us/op 1.77
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 22.593 us/op 17.359 us/op 1.30
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 265.75 us/op 274.59 us/op 0.97
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 2.2636 ms/op 2.6342 ms/op 0.86
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.7675 ms/op 3.6711 ms/op 0.75
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.6103 ms/op 2.9309 ms/op 0.89
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 5.4860 ms/op 8.1992 ms/op 0.67
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 4.1525 ms/op 4.1331 ms/op 1.00
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 7.8163 ms/op 15.054 ms/op 0.52
Tree 40 250000 create 1.1551 s/op 995.28 ms/op 1.16
Tree 40 250000 get(125000) 520.71 ns/op 309.45 ns/op 1.68
Tree 40 250000 set(125000) 3.3605 us/op 1.3746 us/op 2.44
Tree 40 250000 toArray() 46.376 ms/op 25.730 ms/op 1.80
Tree 40 250000 iterate all - toArray() + loop 56.542 ms/op 28.900 ms/op 1.96
Tree 40 250000 iterate all - get(i) 171.64 ms/op 81.290 ms/op 2.11
MutableVector 250000 create 29.277 ms/op 15.328 ms/op 1.91
MutableVector 250000 get(125000) 17.263 ns/op 6.9470 ns/op 2.48
MutableVector 250000 set(125000) 739.71 ns/op 360.51 ns/op 2.05
MutableVector 250000 toArray() 5.8567 ms/op 4.4648 ms/op 1.31
MutableVector 250000 iterate all - toArray() + loop 6.3240 ms/op 4.9187 ms/op 1.29
MutableVector 250000 iterate all - get(i) 3.1649 ms/op 1.5712 ms/op 2.01
Array 250000 create 5.5367 ms/op 4.3060 ms/op 1.29
Array 250000 clone - spread 3.4430 ms/op 1.4250 ms/op 2.42
Array 250000 get(125000) 3.8200 ns/op 1.2840 ns/op 2.98
Array 250000 set(125000) 10.943 ns/op 5.4580 ns/op 2.00
Array 250000 iterate all - loop 422.76 us/op 179.22 us/op 2.36
effectiveBalanceIncrements clone Uint8Array 300000 76.632 us/op 60.477 us/op 1.27
effectiveBalanceIncrements clone MutableVector 300000 1.0350 us/op 476.00 ns/op 2.17
effectiveBalanceIncrements rw all Uint8Array 300000 450.15 us/op 202.56 us/op 2.22
effectiveBalanceIncrements rw all MutableVector 300000 320.24 ms/op 113.56 ms/op 2.82
phase0 afterProcessEpoch - 250000 vs - 7PWei 317.07 ms/op 118.56 ms/op 2.67
phase0 beforeProcessEpoch - 250000 vs - 7PWei 115.25 ms/op 42.520 ms/op 2.71
altair processEpoch - mainnet_e81889 1.2710 s/op 558.74 ms/op 2.27
mainnet_e81889 - altair beforeProcessEpoch 177.26 ms/op 103.09 ms/op 1.72
mainnet_e81889 - altair processJustificationAndFinalization 37.620 us/op 22.220 us/op 1.69
mainnet_e81889 - altair processInactivityUpdates 12.730 ms/op 6.3538 ms/op 2.00
mainnet_e81889 - altair processRewardsAndPenalties 125.32 ms/op 71.975 ms/op 1.74
mainnet_e81889 - altair processRegistryUpdates 5.5250 us/op 4.2240 us/op 1.31
mainnet_e81889 - altair processSlashings 1.4140 us/op 834.00 ns/op 1.70
mainnet_e81889 - altair processEth1DataReset 1.9700 us/op 1.0800 us/op 1.82
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.9259 ms/op 1.4898 ms/op 1.96
mainnet_e81889 - altair processSlashingsReset 11.123 us/op 4.7620 us/op 2.34
mainnet_e81889 - altair processRandaoMixesReset 6.7480 us/op 6.6130 us/op 1.02
mainnet_e81889 - altair processHistoricalRootsUpdate 917.00 ns/op 960.00 ns/op 0.96
mainnet_e81889 - altair processParticipationFlagUpdates 2.7760 us/op 2.9530 us/op 0.94
mainnet_e81889 - altair processSyncCommitteeUpdates 1.3160 us/op 1.0280 us/op 1.28
mainnet_e81889 - altair afterProcessEpoch 172.64 ms/op 125.94 ms/op 1.37
capella processEpoch - mainnet_e217614 2.6100 s/op 2.8289 s/op 0.92
mainnet_e217614 - capella beforeProcessEpoch 585.12 ms/op 582.69 ms/op 1.00
mainnet_e217614 - capella processJustificationAndFinalization 24.909 us/op 23.099 us/op 1.08
mainnet_e217614 - capella processInactivityUpdates 25.978 ms/op 26.894 ms/op 0.97
mainnet_e217614 - capella processRewardsAndPenalties 595.32 ms/op 497.18 ms/op 1.20
mainnet_e217614 - capella processRegistryUpdates 23.983 us/op 44.724 us/op 0.54
mainnet_e217614 - capella processSlashings 824.00 ns/op 1.1020 us/op 0.75
mainnet_e217614 - capella processEth1DataReset 803.00 ns/op 1.2310 us/op 0.65
mainnet_e217614 - capella processEffectiveBalanceUpdates 7.9361 ms/op 7.7432 ms/op 1.02
mainnet_e217614 - capella processSlashingsReset 6.3280 us/op 8.4870 us/op 0.75
mainnet_e217614 - capella processRandaoMixesReset 12.107 us/op 10.168 us/op 1.19
mainnet_e217614 - capella processHistoricalRootsUpdate 1.2200 us/op 1.5930 us/op 0.77
mainnet_e217614 - capella processParticipationFlagUpdates 4.5190 us/op 4.2690 us/op 1.06
mainnet_e217614 - capella afterProcessEpoch 581.96 ms/op 371.10 ms/op 1.57
phase0 processEpoch - mainnet_e58758 853.34 ms/op 667.97 ms/op 1.28
mainnet_e58758 - phase0 beforeProcessEpoch 242.78 ms/op 235.66 ms/op 1.03
mainnet_e58758 - phase0 processJustificationAndFinalization 36.380 us/op 35.726 us/op 1.02
mainnet_e58758 - phase0 processRewardsAndPenalties 92.953 ms/op 73.694 ms/op 1.26
mainnet_e58758 - phase0 processRegistryUpdates 28.557 us/op 28.223 us/op 1.01
mainnet_e58758 - phase0 processSlashings 918.00 ns/op 1.4660 us/op 0.63
mainnet_e58758 - phase0 processEth1DataReset 1.2400 us/op 1.0360 us/op 1.20
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 2.0467 ms/op 1.5936 ms/op 1.28
mainnet_e58758 - phase0 processSlashingsReset 6.8490 us/op 6.6120 us/op 1.04
mainnet_e58758 - phase0 processRandaoMixesReset 10.987 us/op 7.7460 us/op 1.42
mainnet_e58758 - phase0 processHistoricalRootsUpdate 1.1490 us/op 1.2040 us/op 0.95
mainnet_e58758 - phase0 processParticipationRecordUpdates 8.7940 us/op 7.1980 us/op 1.22
mainnet_e58758 - phase0 afterProcessEpoch 132.40 ms/op 101.39 ms/op 1.31
phase0 processEffectiveBalanceUpdates - 250000 normalcase 2.0106 ms/op 1.4472 ms/op 1.39
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.2762 ms/op 1.6279 ms/op 1.40
altair processInactivityUpdates - 250000 normalcase 53.674 ms/op 23.822 ms/op 2.25
altair processInactivityUpdates - 250000 worstcase 49.004 ms/op 29.260 ms/op 1.67
phase0 processRegistryUpdates - 250000 normalcase 13.640 us/op 14.071 us/op 0.97
phase0 processRegistryUpdates - 250000 badcase_full_deposits 728.29 us/op 488.15 us/op 1.49
phase0 processRegistryUpdates - 250000 worstcase 0.5 220.74 ms/op 173.78 ms/op 1.27
altair processRewardsAndPenalties - 250000 normalcase 83.924 ms/op 63.537 ms/op 1.32
altair processRewardsAndPenalties - 250000 worstcase 89.611 ms/op 46.339 ms/op 1.93
phase0 getAttestationDeltas - 250000 normalcase 23.953 ms/op 8.8429 ms/op 2.71
phase0 getAttestationDeltas - 250000 worstcase 17.114 ms/op 12.863 ms/op 1.33
phase0 processSlashings - 250000 worstcase 158.33 us/op 138.36 us/op 1.14
altair processSyncCommitteeUpdates - 250000 304.75 ms/op 192.19 ms/op 1.59
BeaconState.hashTreeRoot - No change 459.00 ns/op 321.00 ns/op 1.43
BeaconState.hashTreeRoot - 1 full validator 270.47 us/op 178.86 us/op 1.51
BeaconState.hashTreeRoot - 32 full validator 3.1211 ms/op 2.3780 ms/op 1.31
BeaconState.hashTreeRoot - 512 full validator 34.282 ms/op 22.237 ms/op 1.54
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 303.11 us/op 219.61 us/op 1.38
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 4.6161 ms/op 2.7165 ms/op 1.70
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 55.523 ms/op 37.704 ms/op 1.47
BeaconState.hashTreeRoot - 1 balances 276.62 us/op 181.68 us/op 1.52
BeaconState.hashTreeRoot - 32 balances 2.8010 ms/op 1.6211 ms/op 1.73
BeaconState.hashTreeRoot - 512 balances 24.421 ms/op 18.226 ms/op 1.34
BeaconState.hashTreeRoot - 250000 balances 372.81 ms/op 267.26 ms/op 1.39
aggregationBits - 2048 els - zipIndexesInBitList 29.091 us/op 35.996 us/op 0.81
byteArrayEquals 32 153.46 ns/op 96.030 ns/op 1.60
Buffer.compare 32 98.812 ns/op 59.988 ns/op 1.65
byteArrayEquals 1024 3.2430 us/op 2.2495 us/op 1.44
Buffer.compare 1024 116.85 ns/op 76.409 ns/op 1.53
byteArrayEquals 16384 70.110 us/op 35.053 us/op 2.00
Buffer.compare 16384 472.53 ns/op 300.11 ns/op 1.57
byteArrayEquals 123687377 399.11 ms/op 293.76 ms/op 1.36
Buffer.compare 123687377 8.9209 ms/op 12.497 ms/op 0.71
byteArrayEquals 32 - diff last byte 93.000 ns/op 93.576 ns/op 0.99
Buffer.compare 32 - diff last byte 74.484 ns/op 65.595 ns/op 1.14
byteArrayEquals 1024 - diff last byte 2.7034 us/op 2.5168 us/op 1.07
Buffer.compare 1024 - diff last byte 93.132 ns/op 84.889 ns/op 1.10
byteArrayEquals 16384 - diff last byte 42.040 us/op 36.875 us/op 1.14
Buffer.compare 16384 - diff last byte 321.44 ns/op 290.18 ns/op 1.11
byteArrayEquals 123687377 - diff last byte 435.57 ms/op 298.64 ms/op 1.46
Buffer.compare 123687377 - diff last byte 8.3150 ms/op 8.4752 ms/op 0.98
byteArrayEquals 32 - random bytes 8.4470 ns/op 7.0780 ns/op 1.19
Buffer.compare 32 - random bytes 97.201 ns/op 69.703 ns/op 1.39
byteArrayEquals 1024 - random bytes 8.2200 ns/op 6.3340 ns/op 1.30
Buffer.compare 1024 - random bytes 93.767 ns/op 66.205 ns/op 1.42
byteArrayEquals 16384 - random bytes 7.9710 ns/op 6.3840 ns/op 1.25
Buffer.compare 16384 - random bytes 93.152 ns/op 66.744 ns/op 1.40
byteArrayEquals 123687377 - random bytes 12.030 ns/op 9.7400 ns/op 1.24
Buffer.compare 123687377 - random bytes 102.63 ns/op 78.030 ns/op 1.32
regular array get 100000 times 63.094 us/op 47.955 us/op 1.32
wrappedArray get 100000 times 60.067 us/op 47.620 us/op 1.26
arrayWithProxy get 100000 times 19.562 ms/op 14.973 ms/op 1.31
ssz.Root.equals 71.966 ns/op 59.232 ns/op 1.21
byteArrayEquals 71.147 ns/op 57.182 ns/op 1.24
Buffer.compare 15.276 ns/op 13.645 ns/op 1.12
shuffle list - 16384 els 9.1351 ms/op 7.5244 ms/op 1.21
shuffle list - 250000 els 131.35 ms/op 109.35 ms/op 1.20
processSlot - 1 slots 23.072 us/op 21.271 us/op 1.08
processSlot - 32 slots 4.1231 ms/op 3.8978 ms/op 1.06
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 66.602 ms/op 64.092 ms/op 1.04
getCommitteeAssignments - req 1 vs - 250000 vc 3.0688 ms/op 2.8730 ms/op 1.07
getCommitteeAssignments - req 100 vs - 250000 vc 4.4285 ms/op 4.1820 ms/op 1.06
getCommitteeAssignments - req 1000 vs - 250000 vc 4.7447 ms/op 4.5294 ms/op 1.05
findModifiedValidators - 10000 modified validators 652.14 ms/op 724.79 ms/op 0.90
findModifiedValidators - 1000 modified validators 510.53 ms/op 582.17 ms/op 0.88
findModifiedValidators - 100 modified validators 501.26 ms/op 641.92 ms/op 0.78
findModifiedValidators - 10 modified validators 472.54 ms/op 610.73 ms/op 0.77
findModifiedValidators - 1 modified validators 488.32 ms/op 604.92 ms/op 0.81
findModifiedValidators - no difference 519.96 ms/op 572.41 ms/op 0.91
compare ViewDUs 5.1000 s/op 5.5454 s/op 0.92
compare each validator Uint8Array 1.9357 s/op 2.2423 s/op 0.86
compare ViewDU to Uint8Array 1.3254 s/op 1.5191 s/op 0.87
migrate state 1000000 validators, 24 modified, 0 new 1.0368 s/op 1.0276 s/op 1.01
migrate state 1000000 validators, 1700 modified, 1000 new 1.5344 s/op 1.3630 s/op 1.13
migrate state 1000000 validators, 3400 modified, 2000 new 1.9395 s/op 1.7555 s/op 1.10
migrate state 1500000 validators, 24 modified, 0 new 1.1667 s/op 999.44 ms/op 1.17
migrate state 1500000 validators, 1700 modified, 1000 new 1.5122 s/op 1.4079 s/op 1.07
migrate state 1500000 validators, 3400 modified, 2000 new 1.9700 s/op 1.7825 s/op 1.11
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 7.4700 ns/op 6.4000 ns/op 1.17
state getBlockRootAtSlot - 250000 vs - 7PWei 1.0008 us/op 877.00 ns/op 1.14
computeProposers - vc 250000 17.453 ms/op 11.522 ms/op 1.51
computeEpochShuffling - vc 250000 204.64 ms/op 116.55 ms/op 1.76
getNextSyncCommittee - vc 250000 320.28 ms/op 194.93 ms/op 1.64
computeSigningRoot for AttestationData 50.002 us/op 35.178 us/op 1.42
hash AttestationData serialized data then Buffer.toString(base64) 3.3006 us/op 2.5995 us/op 1.27
toHexString serialized data 1.5795 us/op 1.8692 us/op 0.84
Buffer.toString(base64) 350.88 ns/op 298.21 ns/op 1.18

by benchmarkbot/action

@nazarhussain nazarhussain merged commit f705b1e into unstable Dec 21, 2023
14 of 16 checks passed
@nazarhussain nazarhussain deleted the nh/vitest-flare branch December 21, 2023 12:16
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.14.0 🎉

ensi321 pushed a commit to ensi321/lodestar that referenced this pull request Jan 22, 2024
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.

None yet

3 participants