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: update vitest to latest version #6967

Merged
merged 13 commits into from
Aug 1, 2024
Merged

Conversation

nazarhussain
Copy link
Contributor

@nazarhussain nazarhussain commented Jul 19, 2024

Motivation

Keep the testing infrastructure updated and stable.

Description

Here are the major changes in this version:

  • Test/Suit options as third parameter are depreciated. describe('title1, fn, options)`
  • The CLI option --segfaultRetry is removed.
  • The Mock type now only accept one generic as a full function, earlier it was taking two parameters and return type.
  • Multiple Hooks now run in sequence, earlier these ran parallel.
  • For coverage ignoreEmptyLines is enabled by default. That may impact test coverage, but it will be more accurate now.

Steps to test or reproduce

  • Run all tests

@nazarhussain nazarhussain requested a review from a team as a code owner July 19, 2024 08:58
@nazarhussain nazarhussain self-assigned this Jul 19, 2024
Copy link

codecov bot commented Jul 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.10%. Comparing base (42af692) to head (084c78d).
Report is 1 commits behind head on unstable.

Additional details and impacted files
@@              Coverage Diff              @@
##           unstable    #6967       +/-   ##
=============================================
- Coverage     62.49%   49.10%   -13.39%     
=============================================
  Files           576      577        +1     
  Lines         61199    37311    -23888     
  Branches       2141     2133        -8     
=============================================
- Hits          38246    18322    -19924     
+ Misses        22914    18950     -3964     
  Partials         39       39               

Copy link
Contributor

github-actions bot commented Jul 19, 2024

⚠️ 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: 7afb24c Previous: 3fb7f60 Ratio
Object access 1 prop 0.40700 ns/op 0.13000 ns/op 3.13
Full benchmark results
Benchmark suite Current: 7afb24c Previous: 3fb7f60 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.8607 ms/op 2.4254 ms/op 0.77
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 48.056 us/op 85.311 us/op 0.56
BLS verify - blst 792.57 us/op 840.80 us/op 0.94
BLS verifyMultipleSignatures 3 - blst 1.3249 ms/op 1.4341 ms/op 0.92
BLS verifyMultipleSignatures 8 - blst 1.9044 ms/op 2.0588 ms/op 0.92
BLS verifyMultipleSignatures 32 - blst 4.7530 ms/op 5.0056 ms/op 0.95
BLS verifyMultipleSignatures 64 - blst 8.7869 ms/op 13.281 ms/op 0.66
BLS verifyMultipleSignatures 128 - blst 17.246 ms/op 20.833 ms/op 0.83
BLS deserializing 10000 signatures 632.96 ms/op 752.72 ms/op 0.84
BLS deserializing 100000 signatures 6.6415 s/op 7.0381 s/op 0.94
BLS verifyMultipleSignatures - same message - 3 - blst 1.0206 ms/op 870.69 us/op 1.17
BLS verifyMultipleSignatures - same message - 8 - blst 1.1250 ms/op 996.59 us/op 1.13
BLS verifyMultipleSignatures - same message - 32 - blst 1.8022 ms/op 1.6303 ms/op 1.11
BLS verifyMultipleSignatures - same message - 64 - blst 2.6924 ms/op 2.5024 ms/op 1.08
BLS verifyMultipleSignatures - same message - 128 - blst 4.3972 ms/op 4.1951 ms/op 1.05
BLS aggregatePubkeys 32 - blst 18.678 us/op 19.552 us/op 0.96
BLS aggregatePubkeys 128 - blst 65.057 us/op 69.505 us/op 0.94
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 68.853 ms/op 62.195 ms/op 1.11
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 85.017 ms/op 55.843 ms/op 1.52
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 41.677 ms/op 32.955 ms/op 1.26
getSlashingsAndExits - default max 230.40 us/op 134.79 us/op 1.71
getSlashingsAndExits - 2k 330.07 us/op 336.54 us/op 0.98
proposeBlockBody type=full, size=empty 5.3164 ms/op 6.1412 ms/op 0.87
isKnown best case - 1 super set check 443.00 ns/op 417.00 ns/op 1.06
isKnown normal case - 2 super set checks 445.00 ns/op 328.00 ns/op 1.36
isKnown worse case - 16 super set checks 451.00 ns/op 367.00 ns/op 1.23
InMemoryCheckpointStateCache - add get delete 4.4400 us/op 6.0610 us/op 0.73
validate api signedAggregateAndProof - struct 1.5529 ms/op 1.4380 ms/op 1.08
validate gossip signedAggregateAndProof - struct 1.5225 ms/op 1.3986 ms/op 1.09
validate gossip attestation - vc 640000 1.0148 ms/op 901.08 us/op 1.13
batch validate gossip attestation - vc 640000 - chunk 32 133.37 us/op 129.72 us/op 1.03
batch validate gossip attestation - vc 640000 - chunk 64 110.79 us/op 125.13 us/op 0.89
batch validate gossip attestation - vc 640000 - chunk 128 103.46 us/op 111.36 us/op 0.93
batch validate gossip attestation - vc 640000 - chunk 256 110.71 us/op 100.97 us/op 1.10
pickEth1Vote - no votes 1.1823 ms/op 1.0084 ms/op 1.17
pickEth1Vote - max votes 10.805 ms/op 7.9940 ms/op 1.35
pickEth1Vote - Eth1Data hashTreeRoot value x2048 15.546 ms/op 13.173 ms/op 1.18
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 28.560 ms/op 20.476 ms/op 1.39
pickEth1Vote - Eth1Data fastSerialize value x2048 482.14 us/op 470.67 us/op 1.02
pickEth1Vote - Eth1Data fastSerialize tree x2048 7.8040 ms/op 6.5456 ms/op 1.19
bytes32 toHexString 947.00 ns/op 413.00 ns/op 2.29
bytes32 Buffer.toString(hex) 561.00 ns/op 242.00 ns/op 2.32
bytes32 Buffer.toString(hex) from Uint8Array 709.00 ns/op 351.00 ns/op 2.02
bytes32 Buffer.toString(hex) + 0x 599.00 ns/op 242.00 ns/op 2.48
Object access 1 prop 0.40700 ns/op 0.13000 ns/op 3.13
Map access 1 prop 0.38100 ns/op 0.13000 ns/op 2.93
Object get x1000 5.3160 ns/op 5.6450 ns/op 0.94
Map get x1000 5.8420 ns/op 6.4090 ns/op 0.91
Object set x1000 41.037 ns/op 32.303 ns/op 1.27
Map set x1000 34.272 ns/op 21.502 ns/op 1.59
Return object 10000 times 0.31690 ns/op 0.28490 ns/op 1.11
Throw Error 10000 times 2.9416 us/op 3.2834 us/op 0.90
fastMsgIdFn sha256 / 200 bytes 2.2150 us/op 2.1670 us/op 1.02
fastMsgIdFn h32 xxhash / 200 bytes 544.00 ns/op 224.00 ns/op 2.43
fastMsgIdFn h64 xxhash / 200 bytes 538.00 ns/op 257.00 ns/op 2.09
fastMsgIdFn sha256 / 1000 bytes 6.4620 us/op 7.0650 us/op 0.91
fastMsgIdFn h32 xxhash / 1000 bytes 669.00 ns/op 345.00 ns/op 1.94
fastMsgIdFn h64 xxhash / 1000 bytes 615.00 ns/op 327.00 ns/op 1.88
fastMsgIdFn sha256 / 10000 bytes 52.620 us/op 62.364 us/op 0.84
fastMsgIdFn h32 xxhash / 10000 bytes 2.1100 us/op 1.7720 us/op 1.19
fastMsgIdFn h64 xxhash / 10000 bytes 1.5170 us/op 1.1590 us/op 1.31
send data - 1000 256B messages 16.618 ms/op 11.373 ms/op 1.46
send data - 1000 512B messages 22.436 ms/op 15.297 ms/op 1.47
send data - 1000 1024B messages 25.460 ms/op 24.591 ms/op 1.04
send data - 1000 1200B messages 32.132 ms/op 25.098 ms/op 1.28
send data - 1000 2048B messages 34.549 ms/op 31.851 ms/op 1.08
send data - 1000 4096B messages 34.094 ms/op 30.690 ms/op 1.11
send data - 1000 16384B messages 75.851 ms/op 68.726 ms/op 1.10
send data - 1000 65536B messages 299.16 ms/op 197.84 ms/op 1.51
enrSubnets - fastDeserialize 64 bits 1.2170 us/op 998.00 ns/op 1.22
enrSubnets - ssz BitVector 64 bits 683.00 ns/op 347.00 ns/op 1.97
enrSubnets - fastDeserialize 4 bits 401.00 ns/op 147.00 ns/op 2.73
enrSubnets - ssz BitVector 4 bits 611.00 ns/op 349.00 ns/op 1.75
prioritizePeers score -10:0 att 32-0.1 sync 2-0 122.11 us/op 140.01 us/op 0.87
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 132.46 us/op 147.85 us/op 0.90
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 200.05 us/op 240.40 us/op 0.83
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 340.27 us/op 392.23 us/op 0.87
prioritizePeers score 0:0 att 64-1 sync 4-1 437.84 us/op 569.14 us/op 0.77
array of 16000 items push then shift 1.3704 us/op 1.6062 us/op 0.85
LinkedList of 16000 items push then shift 6.5110 ns/op 6.9450 ns/op 0.94
array of 16000 items push then pop 87.251 ns/op 101.43 ns/op 0.86
LinkedList of 16000 items push then pop 6.3160 ns/op 6.8310 ns/op 0.92
array of 24000 items push then shift 2.0146 us/op 2.3861 us/op 0.84
LinkedList of 24000 items push then shift 7.6430 ns/op 6.9190 ns/op 1.10
array of 24000 items push then pop 155.74 ns/op 124.35 ns/op 1.25
LinkedList of 24000 items push then pop 6.8640 ns/op 6.7960 ns/op 1.01
intersect bitArray bitLen 8 5.9510 ns/op 6.2880 ns/op 0.95
intersect array and set length 8 39.806 ns/op 44.138 ns/op 0.90
intersect bitArray bitLen 128 26.728 ns/op 29.325 ns/op 0.91
intersect array and set length 128 603.87 ns/op 653.98 ns/op 0.92
bitArray.getTrueBitIndexes() bitLen 128 1.4840 us/op 1.7430 us/op 0.85
bitArray.getTrueBitIndexes() bitLen 248 2.3430 us/op 3.0130 us/op 0.78
bitArray.getTrueBitIndexes() bitLen 512 4.0620 us/op 6.3890 us/op 0.64
Buffer.concat 32 items 1.1640 us/op 881.00 ns/op 1.32
Uint8Array.set 32 items 1.8290 us/op 1.3520 us/op 1.35
Buffer.copy 1.8780 us/op 1.5930 us/op 1.18
Uint8Array.set - with subarray 2.6520 us/op 2.4320 us/op 1.09
Uint8Array.set - without subarray 1.7260 us/op 1.3680 us/op 1.26
getUint32 - dataview 444.00 ns/op 226.00 ns/op 1.96
getUint32 - manual 399.00 ns/op 152.00 ns/op 2.63
Set add up to 64 items then delete first 1.8555 us/op 2.2013 us/op 0.84
OrderedSet add up to 64 items then delete first 2.7555 us/op 3.3354 us/op 0.83
Set add up to 64 items then delete last 1.9704 us/op 2.4455 us/op 0.81
OrderedSet add up to 64 items then delete last 3.0967 us/op 3.5977 us/op 0.86
Set add up to 64 items then delete middle 2.1283 us/op 2.4351 us/op 0.87
OrderedSet add up to 64 items then delete middle 4.6503 us/op 5.0811 us/op 0.92
Set add up to 128 items then delete first 4.0237 us/op 5.0403 us/op 0.80
OrderedSet add up to 128 items then delete first 6.3514 us/op 7.7903 us/op 0.82
Set add up to 128 items then delete last 4.3515 us/op 4.7957 us/op 0.91
OrderedSet add up to 128 items then delete last 6.4287 us/op 7.2034 us/op 0.89
Set add up to 128 items then delete middle 4.2224 us/op 4.7732 us/op 0.88
OrderedSet add up to 128 items then delete middle 13.340 us/op 13.802 us/op 0.97
Set add up to 256 items then delete first 9.0235 us/op 10.317 us/op 0.87
OrderedSet add up to 256 items then delete first 17.120 us/op 15.699 us/op 1.09
Set add up to 256 items then delete last 7.8746 us/op 9.5006 us/op 0.83
OrderedSet add up to 256 items then delete last 11.828 us/op 14.347 us/op 0.82
Set add up to 256 items then delete middle 7.9851 us/op 9.5266 us/op 0.84
OrderedSet add up to 256 items then delete middle 35.368 us/op 40.158 us/op 0.88
transfer serialized Status (84 B) 1.4780 us/op 1.3750 us/op 1.07
copy serialized Status (84 B) 1.2770 us/op 1.0940 us/op 1.17
transfer serialized SignedVoluntaryExit (112 B) 1.5200 us/op 1.4350 us/op 1.06
copy serialized SignedVoluntaryExit (112 B) 1.2430 us/op 1.1150 us/op 1.11
transfer serialized ProposerSlashing (416 B) 1.6950 us/op 1.7060 us/op 0.99
copy serialized ProposerSlashing (416 B) 1.4470 us/op 1.6180 us/op 0.89
transfer serialized Attestation (485 B) 1.7220 us/op 2.1380 us/op 0.81
copy serialized Attestation (485 B) 1.6370 us/op 1.7730 us/op 0.92
transfer serialized AttesterSlashing (33232 B) 2.0590 us/op 2.5600 us/op 0.80
copy serialized AttesterSlashing (33232 B) 4.3950 us/op 5.3410 us/op 0.82
transfer serialized Small SignedBeaconBlock (128000 B) 2.6850 us/op 3.4330 us/op 0.78
copy serialized Small SignedBeaconBlock (128000 B) 9.9410 us/op 17.406 us/op 0.57
transfer serialized Avg SignedBeaconBlock (200000 B) 2.4110 us/op 3.8160 us/op 0.63
copy serialized Avg SignedBeaconBlock (200000 B) 13.512 us/op 25.538 us/op 0.53
transfer serialized BlobsSidecar (524380 B) 3.5500 us/op 3.5230 us/op 1.01
copy serialized BlobsSidecar (524380 B) 147.22 us/op 80.326 us/op 1.83
transfer serialized Big SignedBeaconBlock (1000000 B) 4.5950 us/op 2.8890 us/op 1.59
copy serialized Big SignedBeaconBlock (1000000 B) 312.07 us/op 159.57 us/op 1.96
pass gossip attestations to forkchoice per slot 2.8574 ms/op 3.4065 ms/op 0.84
forkChoice updateHead vc 100000 bc 64 eq 0 402.83 us/op 485.45 us/op 0.83
forkChoice updateHead vc 600000 bc 64 eq 0 2.8952 ms/op 3.2351 ms/op 0.89
forkChoice updateHead vc 1000000 bc 64 eq 0 4.3795 ms/op 5.7001 ms/op 0.77
forkChoice updateHead vc 600000 bc 320 eq 0 2.6666 ms/op 3.0644 ms/op 0.87
forkChoice updateHead vc 600000 bc 1200 eq 0 2.6827 ms/op 3.1430 ms/op 0.85
forkChoice updateHead vc 600000 bc 7200 eq 0 3.3327 ms/op 3.6073 ms/op 0.92
forkChoice updateHead vc 600000 bc 64 eq 1000 9.6009 ms/op 10.600 ms/op 0.91
forkChoice updateHead vc 600000 bc 64 eq 10000 9.5515 ms/op 10.319 ms/op 0.93
forkChoice updateHead vc 600000 bc 64 eq 300000 13.395 ms/op 14.644 ms/op 0.91
computeDeltas 500000 validators 300 proto nodes 3.1482 ms/op 3.6239 ms/op 0.87
computeDeltas 500000 validators 1200 proto nodes 3.0481 ms/op 3.6251 ms/op 0.84
computeDeltas 500000 validators 7200 proto nodes 3.0035 ms/op 3.7361 ms/op 0.80
computeDeltas 750000 validators 300 proto nodes 4.5911 ms/op 5.2702 ms/op 0.87
computeDeltas 750000 validators 1200 proto nodes 4.5297 ms/op 5.2396 ms/op 0.86
computeDeltas 750000 validators 7200 proto nodes 4.5200 ms/op 5.2555 ms/op 0.86
computeDeltas 1400000 validators 300 proto nodes 8.4304 ms/op 10.009 ms/op 0.84
computeDeltas 1400000 validators 1200 proto nodes 8.3869 ms/op 10.497 ms/op 0.80
computeDeltas 1400000 validators 7200 proto nodes 8.2619 ms/op 10.827 ms/op 0.76
computeDeltas 2100000 validators 300 proto nodes 12.590 ms/op 16.302 ms/op 0.77
computeDeltas 2100000 validators 1200 proto nodes 12.691 ms/op 15.193 ms/op 0.84
computeDeltas 2100000 validators 7200 proto nodes 12.710 ms/op 17.018 ms/op 0.75
altair processAttestation - 250000 vs - 7PWei normalcase 1.4640 ms/op 1.9938 ms/op 0.73
altair processAttestation - 250000 vs - 7PWei worstcase 2.7418 ms/op 3.1334 ms/op 0.88
altair processAttestation - setStatus - 1/6 committees join 102.08 us/op 121.98 us/op 0.84
altair processAttestation - setStatus - 1/3 committees join 200.99 us/op 231.16 us/op 0.87
altair processAttestation - setStatus - 1/2 committees join 291.14 us/op 322.16 us/op 0.90
altair processAttestation - setStatus - 2/3 committees join 355.17 us/op 413.92 us/op 0.86
altair processAttestation - setStatus - 4/5 committees join 513.63 us/op 582.06 us/op 0.88
altair processAttestation - setStatus - 100% committees join 577.02 us/op 683.14 us/op 0.84
altair processBlock - 250000 vs - 7PWei normalcase 3.5592 ms/op 4.1138 ms/op 0.87
altair processBlock - 250000 vs - 7PWei normalcase hashState 25.386 ms/op 28.340 ms/op 0.90
altair processBlock - 250000 vs - 7PWei worstcase 35.314 ms/op 34.164 ms/op 1.03
altair processBlock - 250000 vs - 7PWei worstcase hashState 80.761 ms/op 75.141 ms/op 1.07
phase0 processBlock - 250000 vs - 7PWei normalcase 2.2278 ms/op 1.7247 ms/op 1.29
phase0 processBlock - 250000 vs - 7PWei worstcase 25.672 ms/op 19.436 ms/op 1.32
altair processEth1Data - 250000 vs - 7PWei normalcase 278.35 us/op 306.53 us/op 0.91
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 5.9800 us/op 4.9400 us/op 1.21
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 20.184 us/op 17.060 us/op 1.18
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 7.6060 us/op 7.5230 us/op 1.01
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 5.2340 us/op 5.1100 us/op 1.02
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 83.706 us/op 77.627 us/op 1.08
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 565.11 us/op 675.53 us/op 0.84
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 864.39 us/op 929.50 us/op 0.93
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 776.95 us/op 924.34 us/op 0.84
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.2184 ms/op 2.4597 ms/op 0.90
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.3300 ms/op 1.6197 ms/op 0.82
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.0240 ms/op 4.0025 ms/op 0.76
Tree 40 250000 create 184.51 ms/op 239.80 ms/op 0.77
Tree 40 250000 get(125000) 123.08 ns/op 143.43 ns/op 0.86
Tree 40 250000 set(125000) 550.79 ns/op 670.98 ns/op 0.82
Tree 40 250000 toArray() 13.444 ms/op 18.018 ms/op 0.75
Tree 40 250000 iterate all - toArray() + loop 15.935 ms/op 17.549 ms/op 0.91
Tree 40 250000 iterate all - get(i) 44.993 ms/op 53.033 ms/op 0.85
MutableVector 250000 create 7.1086 ms/op 7.3381 ms/op 0.97
MutableVector 250000 get(125000) 5.8300 ns/op 9.3630 ns/op 0.62
MutableVector 250000 set(125000) 169.68 ns/op 225.59 ns/op 0.75
MutableVector 250000 toArray() 3.1256 ms/op 3.5883 ms/op 0.87
MutableVector 250000 iterate all - toArray() + loop 3.3715 ms/op 3.5571 ms/op 0.95
MutableVector 250000 iterate all - get(i) 1.3698 ms/op 1.5668 ms/op 0.87
Array 250000 create 2.8609 ms/op 2.9095 ms/op 0.98
Array 250000 clone - spread 1.2585 ms/op 1.3641 ms/op 0.92
Array 250000 get(125000) 0.55500 ns/op 0.40700 ns/op 1.36
Array 250000 set(125000) 0.57300 ns/op 0.43500 ns/op 1.32
Array 250000 iterate all - loop 73.261 us/op 107.15 us/op 0.68
effectiveBalanceIncrements clone Uint8Array 300000 16.146 us/op 25.532 us/op 0.63
effectiveBalanceIncrements clone MutableVector 300000 310.00 ns/op 125.00 ns/op 2.48
effectiveBalanceIncrements rw all Uint8Array 300000 167.76 us/op 198.79 us/op 0.84
effectiveBalanceIncrements rw all MutableVector 300000 58.543 ms/op 62.582 ms/op 0.94
phase0 afterProcessEpoch - 250000 vs - 7PWei 76.609 ms/op 87.280 ms/op 0.88
Array.fill - length 1000000 2.5802 ms/op 3.3985 ms/op 0.76
Array push - length 1000000 14.072 ms/op 16.952 ms/op 0.83
Array.get 0.25534 ns/op 0.28856 ns/op 0.88
Uint8Array.get 0.34218 ns/op 0.44236 ns/op 0.77
phase0 beforeProcessEpoch - 250000 vs - 7PWei 17.674 ms/op 22.173 ms/op 0.80
altair processEpoch - mainnet_e81889 293.80 ms/op 393.21 ms/op 0.75
mainnet_e81889 - altair beforeProcessEpoch 31.239 ms/op 36.403 ms/op 0.86
mainnet_e81889 - altair processJustificationAndFinalization 9.9680 us/op 12.981 us/op 0.77
mainnet_e81889 - altair processInactivityUpdates 4.6942 ms/op 8.0526 ms/op 0.58
mainnet_e81889 - altair processRewardsAndPenalties 42.590 ms/op 43.773 ms/op 0.97
mainnet_e81889 - altair processRegistryUpdates 2.2660 us/op 3.2570 us/op 0.70
mainnet_e81889 - altair processSlashings 693.00 ns/op 531.00 ns/op 1.31
mainnet_e81889 - altair processEth1DataReset 789.00 ns/op 333.00 ns/op 2.37
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.2519 ms/op 1.1371 ms/op 1.98
mainnet_e81889 - altair processSlashingsReset 3.6470 us/op 2.8720 us/op 1.27
mainnet_e81889 - altair processRandaoMixesReset 3.5530 us/op 3.6210 us/op 0.98
mainnet_e81889 - altair processHistoricalRootsUpdate 1.4830 us/op 523.00 ns/op 2.84
mainnet_e81889 - altair processParticipationFlagUpdates 1.9100 us/op 2.3210 us/op 0.82
mainnet_e81889 - altair processSyncCommitteeUpdates 896.00 ns/op 499.00 ns/op 1.80
mainnet_e81889 - altair afterProcessEpoch 78.405 ms/op 96.098 ms/op 0.82
capella processEpoch - mainnet_e217614 1.1940 s/op 1.4291 s/op 0.84
mainnet_e217614 - capella beforeProcessEpoch 107.07 ms/op 121.87 ms/op 0.88
mainnet_e217614 - capella processJustificationAndFinalization 12.874 us/op 19.167 us/op 0.67
mainnet_e217614 - capella processInactivityUpdates 14.014 ms/op 17.426 ms/op 0.80
mainnet_e217614 - capella processRewardsAndPenalties 248.74 ms/op 251.70 ms/op 0.99
mainnet_e217614 - capella processRegistryUpdates 11.782 us/op 21.727 us/op 0.54
mainnet_e217614 - capella processSlashings 828.00 ns/op 659.00 ns/op 1.26
mainnet_e217614 - capella processEth1DataReset 684.00 ns/op 433.00 ns/op 1.58
mainnet_e217614 - capella processEffectiveBalanceUpdates 2.9319 ms/op 15.136 ms/op 0.19
mainnet_e217614 - capella processSlashingsReset 2.8240 us/op 4.4440 us/op 0.64
mainnet_e217614 - capella processRandaoMixesReset 9.5550 us/op 6.2140 us/op 1.54
mainnet_e217614 - capella processHistoricalRootsUpdate 962.00 ns/op 626.00 ns/op 1.54
mainnet_e217614 - capella processParticipationFlagUpdates 2.1390 us/op 2.9870 us/op 0.72
mainnet_e217614 - capella afterProcessEpoch 242.26 ms/op 271.47 ms/op 0.89
phase0 processEpoch - mainnet_e58758 363.89 ms/op 395.07 ms/op 0.92
mainnet_e58758 - phase0 beforeProcessEpoch 80.131 ms/op 93.215 ms/op 0.86
mainnet_e58758 - phase0 processJustificationAndFinalization 13.391 us/op 18.887 us/op 0.71
mainnet_e58758 - phase0 processRewardsAndPenalties 33.129 ms/op 38.493 ms/op 0.86
mainnet_e58758 - phase0 processRegistryUpdates 4.3840 us/op 7.5080 us/op 0.58
mainnet_e58758 - phase0 processSlashings 636.00 ns/op 445.00 ns/op 1.43
mainnet_e58758 - phase0 processEth1DataReset 692.00 ns/op 417.00 ns/op 1.66
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.2514 ms/op 1.6919 ms/op 0.74
mainnet_e58758 - phase0 processSlashingsReset 2.9200 us/op 2.7260 us/op 1.07
mainnet_e58758 - phase0 processRandaoMixesReset 3.3880 us/op 5.7730 us/op 0.59
mainnet_e58758 - phase0 processHistoricalRootsUpdate 691.00 ns/op 328.00 ns/op 2.11
mainnet_e58758 - phase0 processParticipationRecordUpdates 2.4660 us/op 3.2650 us/op 0.76
mainnet_e58758 - phase0 afterProcessEpoch 67.179 ms/op 85.701 ms/op 0.78
phase0 processEffectiveBalanceUpdates - 250000 normalcase 808.69 us/op 1.2128 ms/op 0.67
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.5705 ms/op 2.0342 ms/op 0.77
altair processInactivityUpdates - 250000 normalcase 18.476 ms/op 16.267 ms/op 1.14
altair processInactivityUpdates - 250000 worstcase 18.033 ms/op 16.192 ms/op 1.11
phase0 processRegistryUpdates - 250000 normalcase 6.2780 us/op 7.0330 us/op 0.89
phase0 processRegistryUpdates - 250000 badcase_full_deposits 307.87 us/op 279.69 us/op 1.10
phase0 processRegistryUpdates - 250000 worstcase 0.5 110.80 ms/op 118.79 ms/op 0.93
altair processRewardsAndPenalties - 250000 normalcase 39.161 ms/op 35.584 ms/op 1.10
altair processRewardsAndPenalties - 250000 worstcase 42.427 ms/op 43.876 ms/op 0.97
phase0 getAttestationDeltas - 250000 normalcase 5.8640 ms/op 8.0306 ms/op 0.73
phase0 getAttestationDeltas - 250000 worstcase 5.9974 ms/op 8.5615 ms/op 0.70
phase0 processSlashings - 250000 worstcase 91.624 us/op 95.310 us/op 0.96
altair processSyncCommitteeUpdates - 250000 103.75 ms/op 121.04 ms/op 0.86
BeaconState.hashTreeRoot - No change 465.00 ns/op 231.00 ns/op 2.01
BeaconState.hashTreeRoot - 1 full validator 83.274 us/op 98.634 us/op 0.84
BeaconState.hashTreeRoot - 32 full validator 843.70 us/op 1.5051 ms/op 0.56
BeaconState.hashTreeRoot - 512 full validator 8.0143 ms/op 16.083 ms/op 0.50
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 123.36 us/op 146.42 us/op 0.84
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.8599 ms/op 2.0483 ms/op 0.91
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 23.527 ms/op 20.086 ms/op 1.17
BeaconState.hashTreeRoot - 1 balances 74.407 us/op 88.817 us/op 0.84
BeaconState.hashTreeRoot - 32 balances 596.87 us/op 877.18 us/op 0.68
BeaconState.hashTreeRoot - 512 balances 5.7840 ms/op 8.2558 ms/op 0.70
BeaconState.hashTreeRoot - 250000 balances 137.00 ms/op 153.07 ms/op 0.90
aggregationBits - 2048 els - zipIndexesInBitList 19.360 us/op 27.838 us/op 0.70
byteArrayEquals 32 47.730 ns/op 54.554 ns/op 0.87
Buffer.compare 32 16.943 ns/op 17.508 ns/op 0.97
byteArrayEquals 1024 1.2615 us/op 1.6090 us/op 0.78
Buffer.compare 1024 23.234 ns/op 24.911 ns/op 0.93
byteArrayEquals 16384 19.968 us/op 25.567 us/op 0.78
Buffer.compare 16384 199.47 ns/op 195.53 ns/op 1.02
byteArrayEquals 123687377 147.01 ms/op 193.83 ms/op 0.76
Buffer.compare 123687377 5.7809 ms/op 7.2015 ms/op 0.80
byteArrayEquals 32 - diff last byte 47.186 ns/op 52.602 ns/op 0.90
Buffer.compare 32 - diff last byte 15.575 ns/op 17.154 ns/op 0.91
byteArrayEquals 1024 - diff last byte 1.2528 us/op 1.5887 us/op 0.79
Buffer.compare 1024 - diff last byte 22.391 ns/op 26.058 ns/op 0.86
byteArrayEquals 16384 - diff last byte 19.953 us/op 25.308 us/op 0.79
Buffer.compare 16384 - diff last byte 186.99 ns/op 206.46 ns/op 0.91
byteArrayEquals 123687377 - diff last byte 150.86 ms/op 190.64 ms/op 0.79
Buffer.compare 123687377 - diff last byte 5.9272 ms/op 6.1729 ms/op 0.96
byteArrayEquals 32 - random bytes 4.8990 ns/op 5.0600 ns/op 0.97
Buffer.compare 32 - random bytes 15.562 ns/op 17.007 ns/op 0.92
byteArrayEquals 1024 - random bytes 5.0020 ns/op 5.1020 ns/op 0.98
Buffer.compare 1024 - random bytes 15.572 ns/op 18.654 ns/op 0.83
byteArrayEquals 16384 - random bytes 5.0320 ns/op 5.0570 ns/op 1.00
Buffer.compare 16384 - random bytes 15.898 ns/op 16.984 ns/op 0.94
byteArrayEquals 123687377 - random bytes 7.8000 ns/op 6.4900 ns/op 1.20
Buffer.compare 123687377 - random bytes 18.640 ns/op 18.110 ns/op 1.03
regular array get 100000 times 30.980 us/op 41.733 us/op 0.74
wrappedArray get 100000 times 30.847 us/op 32.406 us/op 0.95
arrayWithProxy get 100000 times 10.023 ms/op 13.877 ms/op 0.72
ssz.Root.equals 39.694 ns/op 45.969 ns/op 0.86
byteArrayEquals 42.671 ns/op 45.042 ns/op 0.95
Buffer.compare 8.9580 ns/op 10.444 ns/op 0.86
shuffle list - 16384 els 5.5963 ms/op 6.3436 ms/op 0.88
shuffle list - 250000 els 83.011 ms/op 93.919 ms/op 0.88
processSlot - 1 slots 16.153 us/op 14.550 us/op 1.11
processSlot - 32 slots 2.8278 ms/op 3.0850 ms/op 0.92
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 39.360 ms/op 34.999 ms/op 1.12
getCommitteeAssignments - req 1 vs - 250000 vc 1.7877 ms/op 2.1698 ms/op 0.82
getCommitteeAssignments - req 100 vs - 250000 vc 3.5025 ms/op 4.1674 ms/op 0.84
getCommitteeAssignments - req 1000 vs - 250000 vc 3.7724 ms/op 4.4757 ms/op 0.84
findModifiedValidators - 10000 modified validators 221.83 ms/op 451.35 ms/op 0.49
findModifiedValidators - 1000 modified validators 139.93 ms/op 295.67 ms/op 0.47
findModifiedValidators - 100 modified validators 152.05 ms/op 326.64 ms/op 0.47
findModifiedValidators - 10 modified validators 143.36 ms/op 301.05 ms/op 0.48
findModifiedValidators - 1 modified validators 159.80 ms/op 266.35 ms/op 0.60
findModifiedValidators - no difference 162.80 ms/op 226.94 ms/op 0.72
compare ViewDUs 2.9701 s/op 4.6651 s/op 0.64
compare each validator Uint8Array 1.4816 s/op 1.7893 s/op 0.83
compare ViewDU to Uint8Array 676.87 ms/op 1.6951 s/op 0.40
migrate state 1000000 validators, 24 modified, 0 new 544.18 ms/op 893.63 ms/op 0.61
migrate state 1000000 validators, 1700 modified, 1000 new 768.89 ms/op 1.2120 s/op 0.63
migrate state 1000000 validators, 3400 modified, 2000 new 947.46 ms/op 1.6120 s/op 0.59
migrate state 1500000 validators, 24 modified, 0 new 557.42 ms/op 1.0979 s/op 0.51
migrate state 1500000 validators, 1700 modified, 1000 new 808.40 ms/op 1.1750 s/op 0.69
migrate state 1500000 validators, 3400 modified, 2000 new 901.09 ms/op 1.2587 s/op 0.72
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 6.5700 ns/op 4.7400 ns/op 1.39
state getBlockRootAtSlot - 250000 vs - 7PWei 799.93 ns/op 900.55 ns/op 0.89
computeProposers - vc 250000 6.7270 ms/op 8.5673 ms/op 0.79
computeEpochShuffling - vc 250000 87.067 ms/op 95.895 ms/op 0.91
getNextSyncCommittee - vc 250000 97.355 ms/op 137.87 ms/op 0.71
computeSigningRoot for AttestationData 22.669 us/op 19.924 us/op 1.14
hash AttestationData serialized data then Buffer.toString(base64) 1.3396 us/op 1.5814 us/op 0.85
toHexString serialized data 912.89 ns/op 938.81 ns/op 0.97
Buffer.toString(base64) 174.28 ns/op 211.74 ns/op 0.82

by benchmarkbot/action

@nazarhussain nazarhussain marked this pull request as draft July 22, 2024 08:42
@nazarhussain
Copy link
Contributor Author

nazarhussain commented Jul 22, 2024

Converting it to draft as some change in the vitest browser bundling is changing how process.argv returned in browser environment. Earlier it was returned as empty array and now it's undefined in latest version. Some winston dependency is using it and causing the failure in the browser tests. vitest-dev/vitest#6203

});
},
{timeout: 60000}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is cosmetic change because of removing this deprecated parameter.

});
}
},
{timeout: 96_000}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is cosmetic change because of removing this deprecated parameter.

@@ -73,8 +72,6 @@ export async function startValidatorWithKeyManager(
await gracefullyStopChildProcess(validatorProc, 3000);
};

afterEach(stopValidator);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this version of vitest, behavior of hooks is changed. It's more stable to have all hooks listed in the test file to make sure the order of hooks works as expected.

@nazarhussain nazarhussain marked this pull request as ready for review July 27, 2024 23:02
@wemeetagain wemeetagain merged commit 5b0608a into unstable Aug 1, 2024
19 of 20 checks passed
@wemeetagain wemeetagain deleted the nh/vitest-update branch August 1, 2024 17:26
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.21.0 🎉

philknows pushed a commit that referenced this pull request Sep 3, 2024
* Upgrade vitest

* --segfault-retry removed from vitest

* Fix the vitest config

* Fix deprecated syntax

* Fix types

* Add a patch for browser tests

* Update build config

* Revert changes from bundle

* Fix the e2e tests context

* Fix the e2e tests

* Fix the e2e callback hooks

* Fix callback hooks

---------

Co-authored-by: Cayman <caymannava@gmail.com>
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.

3 participants