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

deps: upgrade vitest to 1.4.0 #6570

Merged
merged 3 commits into from
Mar 20, 2024
Merged

deps: upgrade vitest to 1.4.0 #6570

merged 3 commits into from
Mar 20, 2024

Conversation

nazarhussain
Copy link
Contributor

Motivation

Keep the dependencies up-to-date.

Description

  • Upgrade vitest to latest version.
  • Use verbose reporter so all passed tests should be listed.
  • Use github-actions reporter to directly point the code in Github for failure.

Steps to test or reproduce

  • Run all tests

@nazarhussain nazarhussain requested a review from a team as a code owner March 20, 2024 05:16
@nazarhussain nazarhussain self-assigned this Mar 20, 2024
@@ -18,7 +18,9 @@ export default defineConfig({
path.join(__dirname, "./scripts/vitest/setupFiles/customMatchers.ts"),
path.join(__dirname, "./scripts/vitest/setupFiles/dotenv.ts"),
],
reporters: ["default", "hanging-process"],
reporters: process.env.GITHUB_ACTIONS
? ["verbose", "hanging-process", "github-actions"]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing default to verbose will not collapse the passed tests.

@@ -18,7 +18,9 @@ export default defineConfig({
path.join(__dirname, "./scripts/vitest/setupFiles/customMatchers.ts"),
path.join(__dirname, "./scripts/vitest/setupFiles/dotenv.ts"),
],
reporters: ["default", "hanging-process"],
reporters: process.env.GITHUB_ACTIONS
? ["verbose", "hanging-process", "github-actions"]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

github-actions reporter will show the failure directly inside the PR.

https://vitest.dev/guide/reporters.html#github-actions-reporter

Copy link

codecov bot commented Mar 20, 2024

Codecov Report

Merging #6570 (29424fb) into unstable (4686ad1) will increase coverage by 0.06%.
Report is 5 commits behind head on unstable.
The diff coverage is n/a.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #6570      +/-   ##
============================================
+ Coverage     61.39%   61.46%   +0.06%     
============================================
  Files           556      556              
  Lines         58751    58850      +99     
  Branches       1848     1850       +2     
============================================
+ Hits          36073    36171      +98     
  Misses        22638    22638              
- Partials         40       41       +1     

Copy link
Contributor

Performance Report

✔️ no performance regression detected

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: 45f556b Previous: f9676f1 Ratio
Map set x1000 18.859 ns/op 67.706 ns/op 0.28
Set add up to 64 items then delete first 1.8364 us/op 6.0469 us/op 0.30
Set add up to 64 items then delete last 2.1102 us/op 6.6224 us/op 0.32
Set add up to 64 items then delete middle 2.0921 us/op 6.4994 us/op 0.32
Set add up to 128 items then delete first 4.1666 us/op 13.318 us/op 0.31
Set add up to 128 items then delete last 4.0271 us/op 13.107 us/op 0.31
Set add up to 128 items then delete middle 3.9935 us/op 13.262 us/op 0.30
Set add up to 256 items then delete first 8.3358 us/op 27.214 us/op 0.31
OrderedSet add up to 256 items then delete first 12.680 us/op 38.380 us/op 0.33
Set add up to 256 items then delete last 7.8291 us/op 26.543 us/op 0.29
OrderedSet add up to 256 items then delete last 12.133 us/op 36.517 us/op 0.33
Set add up to 256 items then delete middle 7.8740 us/op 26.717 us/op 0.29
computeDeltas 500000 validators 1200 proto nodes 2.9765 ms/op 9.2949 ms/op 0.32
computeDeltas 500000 validators 7200 proto nodes 2.9432 ms/op 9.0264 ms/op 0.33
computeDeltas 750000 validators 300 proto nodes 4.4864 ms/op 13.505 ms/op 0.33
altair processAttestation - setStatus - 1/6 committees join 85.915 us/op 270.62 us/op 0.32
altair processAttestation - setStatus - 1/3 committees join 169.85 us/op 537.42 us/op 0.32
altair processAttestation - setStatus - 1/2 committees join 229.52 us/op 724.28 us/op 0.32
altair processAttestation - setStatus - 2/3 committees join 290.37 us/op 927.99 us/op 0.31
altair processEth1Data - 250000 vs - 7PWei normalcase 305.44 us/op 4.3122 ms/op 0.07
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 759.67 us/op 2.8814 ms/op 0.26
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 20.449 ms/op 61.487 ms/op 0.33
Full benchmark results
Benchmark suite Current: 45f556b Previous: f9676f1 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 869.78 us/op 1.4899 ms/op 0.58
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 59.755 us/op 140.63 us/op 0.42
BLS verify - blst-native 1.0663 ms/op 1.7309 ms/op 0.62
BLS verifyMultipleSignatures 3 - blst-native 2.2955 ms/op 3.6474 ms/op 0.63
BLS verifyMultipleSignatures 8 - blst-native 5.0585 ms/op 8.0317 ms/op 0.63
BLS verifyMultipleSignatures 32 - blst-native 19.435 ms/op 29.456 ms/op 0.66
BLS verifyMultipleSignatures 64 - blst-native 37.088 ms/op 59.252 ms/op 0.63
BLS verifyMultipleSignatures 128 - blst-native 73.630 ms/op 115.16 ms/op 0.64
BLS deserializing 10000 signatures 817.23 ms/op 1.2015 s/op 0.68
BLS deserializing 100000 signatures 8.2690 s/op 11.709 s/op 0.71
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.2011 ms/op 1.7681 ms/op 0.68
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.3188 ms/op 2.0264 ms/op 0.65
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.6227 ms/op 3.0875 ms/op 0.85
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.0969 ms/op 4.5769 ms/op 0.68
BLS verifyMultipleSignatures - same message - 128 - blst-native 6.8446 ms/op 7.5243 ms/op 0.91
BLS aggregatePubkeys 32 - blst-native 23.395 us/op 34.165 us/op 0.68
BLS aggregatePubkeys 128 - blst-native 88.940 us/op 131.94 us/op 0.67
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 52.310 ms/op 76.899 ms/op 0.68
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 56.041 ms/op 79.018 ms/op 0.71
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 28.475 ms/op 56.336 ms/op 0.51
getSlashingsAndExits - default max 136.45 us/op 299.60 us/op 0.46
getSlashingsAndExits - 2k 298.59 us/op 654.09 us/op 0.46
proposeBlockBody type=full, size=empty 4.4148 ms/op 7.5623 ms/op 0.58
isKnown best case - 1 super set check 349.00 ns/op 739.00 ns/op 0.47
isKnown normal case - 2 super set checks 344.00 ns/op 733.00 ns/op 0.47
isKnown worse case - 16 super set checks 335.00 ns/op 733.00 ns/op 0.46
CheckpointStateCache - add get delete 6.4210 us/op 9.7150 us/op 0.66
validate api signedAggregateAndProof - struct 2.3931 ms/op 3.7074 ms/op 0.65
validate gossip signedAggregateAndProof - struct 2.3793 ms/op 3.7124 ms/op 0.64
validate gossip attestation - vc 640000 1.1620 ms/op 1.8160 ms/op 0.64
batch validate gossip attestation - vc 640000 - chunk 32 139.79 us/op 233.50 us/op 0.60
batch validate gossip attestation - vc 640000 - chunk 64 122.73 us/op 204.04 us/op 0.60
batch validate gossip attestation - vc 640000 - chunk 128 117.57 us/op 206.64 us/op 0.57
batch validate gossip attestation - vc 640000 - chunk 256 115.09 us/op 182.84 us/op 0.63
pickEth1Vote - no votes 934.14 us/op 2.0266 ms/op 0.46
pickEth1Vote - max votes 7.8050 ms/op 17.502 ms/op 0.45
pickEth1Vote - Eth1Data hashTreeRoot value x2048 16.649 ms/op 32.731 ms/op 0.51
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 24.045 ms/op 48.459 ms/op 0.50
pickEth1Vote - Eth1Data fastSerialize value x2048 430.48 us/op 1.2011 ms/op 0.36
pickEth1Vote - Eth1Data fastSerialize tree x2048 4.7844 ms/op 11.866 ms/op 0.40
bytes32 toHexString 450.00 ns/op 985.00 ns/op 0.46
bytes32 Buffer.toString(hex) 318.00 ns/op 525.00 ns/op 0.61
bytes32 Buffer.toString(hex) from Uint8Array 434.00 ns/op 820.00 ns/op 0.53
bytes32 Buffer.toString(hex) + 0x 318.00 ns/op 535.00 ns/op 0.59
Object access 1 prop 0.19700 ns/op 0.29100 ns/op 0.68
Map access 1 prop 0.18300 ns/op 0.22800 ns/op 0.80
Object get x1000 4.9880 ns/op 11.448 ns/op 0.44
Map get x1000 0.80100 ns/op 1.1510 ns/op 0.70
Object set x1000 30.560 ns/op 91.412 ns/op 0.33
Map set x1000 18.859 ns/op 67.706 ns/op 0.28
Return object 10000 times 0.22780 ns/op 0.33380 ns/op 0.68
Throw Error 10000 times 2.7595 us/op 6.3300 us/op 0.44
fastMsgIdFn sha256 / 200 bytes 2.0610 us/op 4.7840 us/op 0.43
fastMsgIdFn h32 xxhash / 200 bytes 369.00 ns/op 483.00 ns/op 0.76
fastMsgIdFn h64 xxhash / 200 bytes 364.00 ns/op 579.00 ns/op 0.63
fastMsgIdFn sha256 / 1000 bytes 6.2480 us/op 15.816 us/op 0.40
fastMsgIdFn h32 xxhash / 1000 bytes 455.00 ns/op 609.00 ns/op 0.75
fastMsgIdFn h64 xxhash / 1000 bytes 466.00 ns/op 649.00 ns/op 0.72
fastMsgIdFn sha256 / 10000 bytes 51.589 us/op 140.14 us/op 0.37
fastMsgIdFn h32 xxhash / 10000 bytes 1.8680 us/op 2.1380 us/op 0.87
fastMsgIdFn h64 xxhash / 10000 bytes 1.3200 us/op 1.4830 us/op 0.89
send data - 1000 256B messages 12.573 ms/op 29.949 ms/op 0.42
send data - 1000 512B messages 15.791 ms/op 38.473 ms/op 0.41
send data - 1000 1024B messages 31.587 ms/op 58.660 ms/op 0.54
send data - 1000 1200B messages 42.997 ms/op 65.198 ms/op 0.66
send data - 1000 2048B messages 52.676 ms/op 77.593 ms/op 0.68
send data - 1000 4096B messages 49.868 ms/op 48.421 ms/op 1.03
send data - 1000 16384B messages 115.84 ms/op 185.13 ms/op 0.63
send data - 1000 65536B messages 423.27 ms/op 755.93 ms/op 0.56
enrSubnets - fastDeserialize 64 bits 1.4680 us/op 2.5110 us/op 0.58
enrSubnets - ssz BitVector 64 bits 575.00 ns/op 837.00 ns/op 0.69
enrSubnets - fastDeserialize 4 bits 284.00 ns/op 326.00 ns/op 0.87
enrSubnets - ssz BitVector 4 bits 603.00 ns/op 799.00 ns/op 0.75
prioritizePeers score -10:0 att 32-0.1 sync 2-0 80.519 us/op 164.00 us/op 0.49
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 106.14 us/op 201.24 us/op 0.53
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 145.72 us/op 283.53 us/op 0.51
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 219.61 us/op 469.28 us/op 0.47
prioritizePeers score 0:0 att 64-1 sync 4-1 242.91 us/op 504.66 us/op 0.48
array of 16000 items push then shift 1.3606 us/op 2.3257 us/op 0.59
LinkedList of 16000 items push then shift 8.1090 ns/op 10.947 ns/op 0.74
array of 16000 items push then pop 101.87 ns/op 153.47 ns/op 0.66
LinkedList of 16000 items push then pop 6.0930 ns/op 11.258 ns/op 0.54
array of 24000 items push then shift 2.0439 us/op 3.4082 us/op 0.60
LinkedList of 24000 items push then shift 6.3760 ns/op 10.944 ns/op 0.58
array of 24000 items push then pop 116.06 ns/op 202.40 ns/op 0.57
LinkedList of 24000 items push then pop 9.1320 ns/op 10.785 ns/op 0.85
intersect bitArray bitLen 8 9.3640 ns/op 8.6490 ns/op 1.08
intersect array and set length 8 55.289 ns/op 124.99 ns/op 0.44
intersect bitArray bitLen 128 31.763 ns/op 49.338 ns/op 0.64
intersect array and set length 128 738.51 ns/op 1.4815 us/op 0.50
bitArray.getTrueBitIndexes() bitLen 128 1.3200 us/op 2.3830 us/op 0.55
bitArray.getTrueBitIndexes() bitLen 248 2.0970 us/op 4.0020 us/op 0.52
bitArray.getTrueBitIndexes() bitLen 512 4.1060 us/op 8.0910 us/op 0.51
Buffer.concat 32 items 865.00 ns/op 1.7910 us/op 0.48
Uint8Array.set 32 items 1.4790 us/op 2.7150 us/op 0.54
Set add up to 64 items then delete first 1.8364 us/op 6.0469 us/op 0.30
OrderedSet add up to 64 items then delete first 2.8218 us/op 8.1440 us/op 0.35
Set add up to 64 items then delete last 2.1102 us/op 6.6224 us/op 0.32
OrderedSet add up to 64 items then delete last 3.1521 us/op 8.9036 us/op 0.35
Set add up to 64 items then delete middle 2.0921 us/op 6.4994 us/op 0.32
OrderedSet add up to 64 items then delete middle 4.5333 us/op 10.467 us/op 0.43
Set add up to 128 items then delete first 4.1666 us/op 13.318 us/op 0.31
OrderedSet add up to 128 items then delete first 6.6033 us/op 18.604 us/op 0.35
Set add up to 128 items then delete last 4.0271 us/op 13.107 us/op 0.31
OrderedSet add up to 128 items then delete last 6.1163 us/op 17.720 us/op 0.35
Set add up to 128 items then delete middle 3.9935 us/op 13.262 us/op 0.30
OrderedSet add up to 128 items then delete middle 11.285 us/op 25.476 us/op 0.44
Set add up to 256 items then delete first 8.3358 us/op 27.214 us/op 0.31
OrderedSet add up to 256 items then delete first 12.680 us/op 38.380 us/op 0.33
Set add up to 256 items then delete last 7.8291 us/op 26.543 us/op 0.29
OrderedSet add up to 256 items then delete last 12.133 us/op 36.517 us/op 0.33
Set add up to 256 items then delete middle 7.8740 us/op 26.717 us/op 0.29
OrderedSet add up to 256 items then delete middle 33.528 us/op 68.477 us/op 0.49
transfer serialized Status (84 B) 1.8850 us/op 3.0150 us/op 0.63
copy serialized Status (84 B) 1.3600 us/op 2.2860 us/op 0.59
transfer serialized SignedVoluntaryExit (112 B) 1.9590 us/op 3.2090 us/op 0.61
copy serialized SignedVoluntaryExit (112 B) 1.4910 us/op 2.3450 us/op 0.64
transfer serialized ProposerSlashing (416 B) 2.3650 us/op 3.6730 us/op 0.64
copy serialized ProposerSlashing (416 B) 1.9900 us/op 3.7790 us/op 0.53
transfer serialized Attestation (485 B) 2.3260 us/op 4.8540 us/op 0.48
copy serialized Attestation (485 B) 2.1900 us/op 4.5810 us/op 0.48
transfer serialized AttesterSlashing (33232 B) 1.9570 us/op 4.7060 us/op 0.42
copy serialized AttesterSlashing (33232 B) 8.2700 us/op 12.905 us/op 0.64
transfer serialized Small SignedBeaconBlock (128000 B) 2.1020 us/op 4.6140 us/op 0.46
copy serialized Small SignedBeaconBlock (128000 B) 25.002 us/op 34.541 us/op 0.72
transfer serialized Avg SignedBeaconBlock (200000 B) 2.0690 us/op 5.2430 us/op 0.39
copy serialized Avg SignedBeaconBlock (200000 B) 31.927 us/op 49.499 us/op 0.65
transfer serialized BlobsSidecar (524380 B) 2.2380 us/op 5.6120 us/op 0.40
copy serialized BlobsSidecar (524380 B) 156.54 us/op 125.09 us/op 1.25
transfer serialized Big SignedBeaconBlock (1000000 B) 3.1980 us/op 6.6100 us/op 0.48
copy serialized Big SignedBeaconBlock (1000000 B) 248.97 us/op 229.40 us/op 1.09
pass gossip attestations to forkchoice per slot 2.9158 ms/op 6.1082 ms/op 0.48
forkChoice updateHead vc 100000 bc 64 eq 0 457.37 us/op 904.09 us/op 0.51
forkChoice updateHead vc 600000 bc 64 eq 0 5.0103 ms/op 7.3537 ms/op 0.68
forkChoice updateHead vc 1000000 bc 64 eq 0 4.7886 ms/op 9.3324 ms/op 0.51
forkChoice updateHead vc 600000 bc 320 eq 0 2.8094 ms/op 5.6187 ms/op 0.50
forkChoice updateHead vc 600000 bc 1200 eq 0 2.8032 ms/op 5.8381 ms/op 0.48
forkChoice updateHead vc 600000 bc 7200 eq 0 4.1472 ms/op 7.6788 ms/op 0.54
forkChoice updateHead vc 600000 bc 64 eq 1000 10.054 ms/op 17.230 ms/op 0.58
forkChoice updateHead vc 600000 bc 64 eq 10000 9.9248 ms/op 17.437 ms/op 0.57
forkChoice updateHead vc 600000 bc 64 eq 300000 14.880 ms/op 24.728 ms/op 0.60
computeDeltas 500000 validators 300 proto nodes 3.1876 ms/op 8.9553 ms/op 0.36
computeDeltas 500000 validators 1200 proto nodes 2.9765 ms/op 9.2949 ms/op 0.32
computeDeltas 500000 validators 7200 proto nodes 2.9432 ms/op 9.0264 ms/op 0.33
computeDeltas 750000 validators 300 proto nodes 4.4864 ms/op 13.505 ms/op 0.33
computeDeltas 750000 validators 1200 proto nodes 4.5382 ms/op 13.353 ms/op 0.34
computeDeltas 750000 validators 7200 proto nodes 4.6261 ms/op 13.400 ms/op 0.35
computeDeltas 1400000 validators 300 proto nodes 9.5622 ms/op 24.522 ms/op 0.39
computeDeltas 1400000 validators 1200 proto nodes 9.2126 ms/op 25.644 ms/op 0.36
computeDeltas 1400000 validators 7200 proto nodes 9.2591 ms/op 24.456 ms/op 0.38
computeDeltas 2100000 validators 300 proto nodes 14.120 ms/op 38.595 ms/op 0.37
computeDeltas 2100000 validators 1200 proto nodes 13.866 ms/op 39.240 ms/op 0.35
computeDeltas 2100000 validators 7200 proto nodes 13.906 ms/op 38.272 ms/op 0.36
altair processAttestation - 250000 vs - 7PWei normalcase 2.3795 ms/op 3.7609 ms/op 0.63
altair processAttestation - 250000 vs - 7PWei worstcase 2.9919 ms/op 5.4933 ms/op 0.54
altair processAttestation - setStatus - 1/6 committees join 85.915 us/op 270.62 us/op 0.32
altair processAttestation - setStatus - 1/3 committees join 169.85 us/op 537.42 us/op 0.32
altair processAttestation - setStatus - 1/2 committees join 229.52 us/op 724.28 us/op 0.32
altair processAttestation - setStatus - 2/3 committees join 290.37 us/op 927.99 us/op 0.31
altair processAttestation - setStatus - 4/5 committees join 423.50 us/op 1.1855 ms/op 0.36
altair processAttestation - setStatus - 100% committees join 518.73 us/op 1.3576 ms/op 0.38
altair processBlock - 250000 vs - 7PWei normalcase 8.4438 ms/op 14.156 ms/op 0.60
altair processBlock - 250000 vs - 7PWei normalcase hashState 32.237 ms/op 46.842 ms/op 0.69
altair processBlock - 250000 vs - 7PWei worstcase 33.718 ms/op 56.581 ms/op 0.60
altair processBlock - 250000 vs - 7PWei worstcase hashState 81.572 ms/op 138.70 ms/op 0.59
phase0 processBlock - 250000 vs - 7PWei normalcase 1.6003 ms/op 4.2721 ms/op 0.37
phase0 processBlock - 250000 vs - 7PWei worstcase 24.477 ms/op 42.012 ms/op 0.58
altair processEth1Data - 250000 vs - 7PWei normalcase 305.44 us/op 4.3122 ms/op 0.07
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 14.003 us/op 28.223 us/op 0.50
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 65.851 us/op 102.61 us/op 0.64
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 20.148 us/op 34.859 us/op 0.58
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 7.6530 us/op 22.472 us/op 0.34
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 170.45 us/op 338.50 us/op 0.50
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 759.67 us/op 2.8814 ms/op 0.26
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.2577 ms/op 3.2737 ms/op 0.38
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.8793 ms/op 3.3222 ms/op 0.57
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.3980 ms/op 6.2993 ms/op 0.38
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.6855 ms/op 4.9465 ms/op 0.34
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.5270 ms/op 8.2016 ms/op 0.43
Tree 40 250000 create 254.38 ms/op 857.31 ms/op 0.30
Tree 40 250000 get(125000) 113.09 ns/op 318.97 ns/op 0.35
Tree 40 250000 set(125000) 753.64 ns/op 3.0290 us/op 0.25
Tree 40 250000 toArray() 9.4721 ms/op 28.597 ms/op 0.33
Tree 40 250000 iterate all - toArray() + loop 10.527 ms/op 28.648 ms/op 0.37
Tree 40 250000 iterate all - get(i) 39.915 ms/op 110.66 ms/op 0.36
MutableVector 250000 create 9.3190 ms/op 25.758 ms/op 0.36
MutableVector 250000 get(125000) 5.4950 ns/op 9.7130 ns/op 0.57
MutableVector 250000 set(125000) 191.16 ns/op 682.58 ns/op 0.28
MutableVector 250000 toArray() 2.4087 ms/op 4.8961 ms/op 0.49
MutableVector 250000 iterate all - toArray() + loop 2.3603 ms/op 5.6930 ms/op 0.41
MutableVector 250000 iterate all - get(i) 1.3464 ms/op 2.4039 ms/op 0.56
Array 250000 create 2.1663 ms/op 4.8804 ms/op 0.44
Array 250000 clone - spread 1.1483 ms/op 3.0186 ms/op 0.38
Array 250000 get(125000) 1.0500 ns/op 2.0130 ns/op 0.52
Array 250000 set(125000) 1.2650 ns/op 4.8290 ns/op 0.26
Array 250000 iterate all - loop 156.79 us/op 225.73 us/op 0.69
effectiveBalanceIncrements clone Uint8Array 300000 14.241 us/op 72.262 us/op 0.20
effectiveBalanceIncrements clone MutableVector 300000 426.00 ns/op 1.0550 us/op 0.40
effectiveBalanceIncrements rw all Uint8Array 300000 187.41 us/op 300.81 us/op 0.62
effectiveBalanceIncrements rw all MutableVector 300000 65.757 ms/op 215.06 ms/op 0.31
phase0 afterProcessEpoch - 250000 vs - 7PWei 76.236 ms/op 160.58 ms/op 0.47
phase0 beforeProcessEpoch - 250000 vs - 7PWei 44.070 ms/op 74.027 ms/op 0.60
altair processEpoch - mainnet_e81889 429.34 ms/op 740.81 ms/op 0.58
mainnet_e81889 - altair beforeProcessEpoch 75.579 ms/op 116.89 ms/op 0.65
mainnet_e81889 - altair processJustificationAndFinalization 9.6580 us/op 33.374 us/op 0.29
mainnet_e81889 - altair processInactivityUpdates 4.7454 ms/op 10.346 ms/op 0.46
mainnet_e81889 - altair processRewardsAndPenalties 64.285 ms/op 91.911 ms/op 0.70
mainnet_e81889 - altair processRegistryUpdates 2.1140 us/op 5.9580 us/op 0.35
mainnet_e81889 - altair processSlashings 720.00 ns/op 1.0240 us/op 0.70
mainnet_e81889 - altair processEth1DataReset 612.00 ns/op 1.5010 us/op 0.41
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.0134 ms/op 2.6398 ms/op 0.38
mainnet_e81889 - altair processSlashingsReset 2.6450 us/op 8.6850 us/op 0.30
mainnet_e81889 - altair processRandaoMixesReset 2.9210 us/op 10.493 us/op 0.28
mainnet_e81889 - altair processHistoricalRootsUpdate 970.00 ns/op 1.3860 us/op 0.70
mainnet_e81889 - altair processParticipationFlagUpdates 2.4670 us/op 4.3380 us/op 0.57
mainnet_e81889 - altair processSyncCommitteeUpdates 853.00 ns/op 1.4150 us/op 0.60
mainnet_e81889 - altair afterProcessEpoch 80.918 ms/op 171.18 ms/op 0.47
capella processEpoch - mainnet_e217614 1.6403 s/op 3.2047 s/op 0.51
mainnet_e217614 - capella beforeProcessEpoch 385.46 ms/op 744.72 ms/op 0.52
mainnet_e217614 - capella processJustificationAndFinalization 12.526 us/op 31.329 us/op 0.40
mainnet_e217614 - capella processInactivityUpdates 16.171 ms/op 27.756 ms/op 0.58
mainnet_e217614 - capella processRewardsAndPenalties 465.07 ms/op 821.96 ms/op 0.57
mainnet_e217614 - capella processRegistryUpdates 23.495 us/op 47.506 us/op 0.49
mainnet_e217614 - capella processSlashings 706.00 ns/op 1.5170 us/op 0.47
mainnet_e217614 - capella processEth1DataReset 598.00 ns/op 1.0690 us/op 0.56
mainnet_e217614 - capella processEffectiveBalanceUpdates 3.4573 ms/op 7.5465 ms/op 0.46
mainnet_e217614 - capella processSlashingsReset 3.5750 us/op 5.6780 us/op 0.63
mainnet_e217614 - capella processRandaoMixesReset 4.2270 us/op 10.646 us/op 0.40
mainnet_e217614 - capella processHistoricalRootsUpdate 850.00 ns/op 1.2500 us/op 0.68
mainnet_e217614 - capella processParticipationFlagUpdates 1.5370 us/op 3.6320 us/op 0.42
mainnet_e217614 - capella afterProcessEpoch 208.39 ms/op 527.18 ms/op 0.40
phase0 processEpoch - mainnet_e58758 437.17 ms/op 711.00 ms/op 0.61
mainnet_e58758 - phase0 beforeProcessEpoch 131.91 ms/op 235.91 ms/op 0.56
mainnet_e58758 - phase0 processJustificationAndFinalization 21.656 us/op 38.247 us/op 0.57
mainnet_e58758 - phase0 processRewardsAndPenalties 53.820 ms/op 78.943 ms/op 0.68
mainnet_e58758 - phase0 processRegistryUpdates 8.9040 us/op 21.427 us/op 0.42
mainnet_e58758 - phase0 processSlashings 961.00 ns/op 1.2770 us/op 0.75
mainnet_e58758 - phase0 processEth1DataReset 701.00 ns/op 1.2420 us/op 0.56
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 983.25 us/op 2.6001 ms/op 0.38
mainnet_e58758 - phase0 processSlashingsReset 1.8350 us/op 7.2060 us/op 0.25
mainnet_e58758 - phase0 processRandaoMixesReset 4.6750 us/op 9.6340 us/op 0.49
mainnet_e58758 - phase0 processHistoricalRootsUpdate 667.00 ns/op 1.1990 us/op 0.56
mainnet_e58758 - phase0 processParticipationRecordUpdates 2.7720 us/op 9.0110 us/op 0.31
mainnet_e58758 - phase0 afterProcessEpoch 67.881 ms/op 141.88 ms/op 0.48
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.0187 ms/op 3.0409 ms/op 0.34
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.5128 ms/op 3.0245 ms/op 0.50
altair processInactivityUpdates - 250000 normalcase 22.931 ms/op 41.679 ms/op 0.55
altair processInactivityUpdates - 250000 worstcase 22.109 ms/op 47.210 ms/op 0.47
phase0 processRegistryUpdates - 250000 normalcase 7.6050 us/op 23.351 us/op 0.33
phase0 processRegistryUpdates - 250000 badcase_full_deposits 441.90 us/op 958.26 us/op 0.46
phase0 processRegistryUpdates - 250000 worstcase 0.5 124.30 ms/op 243.16 ms/op 0.51
altair processRewardsAndPenalties - 250000 normalcase 68.790 ms/op 110.20 ms/op 0.62
altair processRewardsAndPenalties - 250000 worstcase 72.936 ms/op 115.68 ms/op 0.63
phase0 getAttestationDeltas - 250000 normalcase 5.5838 ms/op 15.552 ms/op 0.36
phase0 getAttestationDeltas - 250000 worstcase 5.6770 ms/op 15.657 ms/op 0.36
phase0 processSlashings - 250000 worstcase 85.184 us/op 201.65 us/op 0.42
altair processSyncCommitteeUpdates - 250000 108.24 ms/op 258.40 ms/op 0.42
BeaconState.hashTreeRoot - No change 398.00 ns/op 1.0220 us/op 0.39
BeaconState.hashTreeRoot - 1 full validator 137.66 us/op 232.20 us/op 0.59
BeaconState.hashTreeRoot - 32 full validator 1.6556 ms/op 2.3868 ms/op 0.69
BeaconState.hashTreeRoot - 512 full validator 17.140 ms/op 23.838 ms/op 0.72
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 189.43 us/op 228.59 us/op 0.83
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.6070 ms/op 3.1884 ms/op 0.50
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 20.449 ms/op 61.487 ms/op 0.33
BeaconState.hashTreeRoot - 1 balances 100.12 us/op 181.33 us/op 0.55
BeaconState.hashTreeRoot - 32 balances 1.0161 ms/op 1.6054 ms/op 0.63
BeaconState.hashTreeRoot - 512 balances 12.749 ms/op 16.107 ms/op 0.79
BeaconState.hashTreeRoot - 250000 balances 217.09 ms/op 303.28 ms/op 0.72
aggregationBits - 2048 els - zipIndexesInBitList 21.760 us/op 51.158 us/op 0.43
byteArrayEquals 32 67.114 ns/op 107.92 ns/op 0.62
Buffer.compare 32 38.095 ns/op 92.800 ns/op 0.41
byteArrayEquals 1024 1.8262 us/op 2.7927 us/op 0.65
Buffer.compare 1024 46.704 ns/op 93.983 ns/op 0.50
byteArrayEquals 16384 28.827 us/op 44.605 us/op 0.65
Buffer.compare 16384 224.66 ns/op 369.19 ns/op 0.61
byteArrayEquals 123687377 212.03 ms/op 335.46 ms/op 0.63
Buffer.compare 123687377 5.7439 ms/op 10.121 ms/op 0.57
byteArrayEquals 32 - diff last byte 64.287 ns/op 98.680 ns/op 0.65
Buffer.compare 32 - diff last byte 38.483 ns/op 89.630 ns/op 0.43
byteArrayEquals 1024 - diff last byte 1.7906 us/op 2.7854 us/op 0.64
Buffer.compare 1024 - diff last byte 47.046 ns/op 94.667 ns/op 0.50
byteArrayEquals 16384 - diff last byte 28.702 us/op 44.528 us/op 0.64
Buffer.compare 16384 - diff last byte 220.33 ns/op 359.23 ns/op 0.61
byteArrayEquals 123687377 - diff last byte 222.39 ms/op 337.37 ms/op 0.66
Buffer.compare 123687377 - diff last byte 6.2482 ms/op 10.250 ms/op 0.61
byteArrayEquals 32 - random bytes 4.8740 ns/op 8.1840 ns/op 0.60
Buffer.compare 32 - random bytes 41.302 ns/op 92.012 ns/op 0.45
byteArrayEquals 1024 - random bytes 4.7280 ns/op 7.8110 ns/op 0.61
Buffer.compare 1024 - random bytes 39.858 ns/op 88.934 ns/op 0.45
byteArrayEquals 16384 - random bytes 4.6970 ns/op 7.7870 ns/op 0.60
Buffer.compare 16384 - random bytes 39.779 ns/op 90.205 ns/op 0.44
byteArrayEquals 123687377 - random bytes 8.4200 ns/op 15.680 ns/op 0.54
Buffer.compare 123687377 - random bytes 43.290 ns/op 96.800 ns/op 0.45
regular array get 100000 times 44.106 us/op 60.984 us/op 0.72
wrappedArray get 100000 times 44.187 us/op 60.852 us/op 0.73
arrayWithProxy get 100000 times 10.396 ms/op 26.458 ms/op 0.39
ssz.Root.equals 57.593 ns/op 83.308 ns/op 0.69
byteArrayEquals 56.487 ns/op 82.734 ns/op 0.68
Buffer.compare 9.6300 ns/op 16.592 ns/op 0.58
shuffle list - 16384 els 6.2334 ms/op 12.047 ms/op 0.52
shuffle list - 250000 els 90.394 ms/op 175.53 ms/op 0.51
processSlot - 1 slots 12.181 us/op 30.874 us/op 0.39
processSlot - 32 slots 2.1779 ms/op 6.2641 ms/op 0.35
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 48.386 ms/op 90.649 ms/op 0.53
getCommitteeAssignments - req 1 vs - 250000 vc 2.4072 ms/op 4.1630 ms/op 0.58
getCommitteeAssignments - req 100 vs - 250000 vc 3.6000 ms/op 5.9788 ms/op 0.60
getCommitteeAssignments - req 1000 vs - 250000 vc 3.8960 ms/op 6.4321 ms/op 0.61
findModifiedValidators - 10000 modified validators 456.76 ms/op 884.41 ms/op 0.52
findModifiedValidators - 1000 modified validators 316.05 ms/op 682.54 ms/op 0.46
findModifiedValidators - 100 modified validators 308.89 ms/op 664.39 ms/op 0.46
findModifiedValidators - 10 modified validators 320.02 ms/op 718.20 ms/op 0.45
findModifiedValidators - 1 modified validators 290.21 ms/op 678.49 ms/op 0.43
findModifiedValidators - no difference 324.12 ms/op 670.88 ms/op 0.48
compare ViewDUs 4.0356 s/op 7.2137 s/op 0.56
compare each validator Uint8Array 1.5769 s/op 2.7797 s/op 0.57
compare ViewDU to Uint8Array 851.40 ms/op 2.2684 s/op 0.38
migrate state 1000000 validators, 24 modified, 0 new 731.16 ms/op 1.3269 s/op 0.55
migrate state 1000000 validators, 1700 modified, 1000 new 932.58 ms/op 1.8038 s/op 0.52
migrate state 1000000 validators, 3400 modified, 2000 new 1.1525 s/op 2.1289 s/op 0.54
migrate state 1500000 validators, 24 modified, 0 new 741.77 ms/op 1.3643 s/op 0.54
migrate state 1500000 validators, 1700 modified, 1000 new 886.86 ms/op 1.8601 s/op 0.48
migrate state 1500000 validators, 3400 modified, 2000 new 1.1661 s/op 2.2647 s/op 0.51
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.6700 ns/op 7.7800 ns/op 0.60
state getBlockRootAtSlot - 250000 vs - 7PWei 542.88 ns/op 1.5564 us/op 0.35
computeProposers - vc 250000 6.2175 ms/op 15.073 ms/op 0.41
computeEpochShuffling - vc 250000 86.657 ms/op 175.50 ms/op 0.49
getNextSyncCommittee - vc 250000 106.04 ms/op 250.79 ms/op 0.42
computeSigningRoot for AttestationData 20.082 us/op 43.694 us/op 0.46
hash AttestationData serialized data then Buffer.toString(base64) 1.2825 us/op 3.3113 us/op 0.39
toHexString serialized data 802.15 ns/op 1.8364 us/op 0.44
Buffer.toString(base64) 155.46 ns/op 412.58 ns/op 0.38

by benchmarkbot/action

@nazarhussain nazarhussain merged commit 7c92d20 into unstable Mar 20, 2024
20 checks passed
@nazarhussain nazarhussain deleted the nh/vitest-upgrade branch March 20, 2024 12:44
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.18.0 🎉

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.

4 participants