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

fix: use proper newlines in metrics output #5595

Merged
merged 1 commit into from
Jun 1, 2023
Merged

Conversation

wemeetagain
Copy link
Member

Motivation

#5590 introduced invalid metrics output by using incorrectly formatted newlines

Description

Fix the bug in #5590
Use proper newlines

@wemeetagain wemeetagain requested a review from a team as a code owner June 1, 2023 03:21
@github-actions
Copy link
Contributor

github-actions bot commented Jun 1, 2023

Performance Report

✔️ no performance regression detected

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: 9172ebb Previous: aee17f8 Ratio
forkChoice updateHead vc 600000 bc 64 eq 300000 34.994 ms/op 106.00 ms/op 0.33
Full benchmark results
Benchmark suite Current: 9172ebb Previous: aee17f8 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 844.18 us/op 508.17 us/op 1.66
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 49.841 us/op 48.208 us/op 1.03
BLS verify - blst-native 1.2172 ms/op 1.2450 ms/op 0.98
BLS verifyMultipleSignatures 3 - blst-native 2.4740 ms/op 2.4472 ms/op 1.01
BLS verifyMultipleSignatures 8 - blst-native 5.3125 ms/op 5.2745 ms/op 1.01
BLS verifyMultipleSignatures 32 - blst-native 19.200 ms/op 19.608 ms/op 0.98
BLS aggregatePubkeys 32 - blst-native 25.626 us/op 26.043 us/op 0.98
BLS aggregatePubkeys 128 - blst-native 100.52 us/op 101.25 us/op 0.99
getAttestationsForBlock 57.649 ms/op 63.815 ms/op 0.90
isKnown best case - 1 super set check 259.00 ns/op 268.00 ns/op 0.97
isKnown normal case - 2 super set checks 253.00 ns/op 254.00 ns/op 1.00
isKnown worse case - 16 super set checks 253.00 ns/op 261.00 ns/op 0.97
CheckpointStateCache - add get delete 5.3090 us/op 5.5350 us/op 0.96
validate gossip signedAggregateAndProof - struct 2.7501 ms/op 2.8388 ms/op 0.97
validate gossip attestation - struct 1.3141 ms/op 1.3687 ms/op 0.96
pickEth1Vote - no votes 1.2751 ms/op 1.3830 ms/op 0.92
pickEth1Vote - max votes 11.925 ms/op 10.285 ms/op 1.16
pickEth1Vote - Eth1Data hashTreeRoot value x2048 9.6529 ms/op 9.3502 ms/op 1.03
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 16.666 ms/op 16.102 ms/op 1.04
pickEth1Vote - Eth1Data fastSerialize value x2048 698.21 us/op 714.01 us/op 0.98
pickEth1Vote - Eth1Data fastSerialize tree x2048 8.2398 ms/op 5.1834 ms/op 1.59
bytes32 toHexString 687.00 ns/op 543.00 ns/op 1.27
bytes32 Buffer.toString(hex) 416.00 ns/op 421.00 ns/op 0.99
bytes32 Buffer.toString(hex) from Uint8Array 622.00 ns/op 614.00 ns/op 1.01
bytes32 Buffer.toString(hex) + 0x 409.00 ns/op 435.00 ns/op 0.94
Object access 1 prop 0.17500 ns/op 0.18700 ns/op 0.94
Map access 1 prop 0.15500 ns/op 0.16300 ns/op 0.95
Object get x1000 6.5540 ns/op 7.1950 ns/op 0.91
Map get x1000 0.55100 ns/op 0.67500 ns/op 0.82
Object set x1000 52.540 ns/op 79.373 ns/op 0.66
Map set x1000 46.617 ns/op 62.161 ns/op 0.75
Return object 10000 times 0.24310 ns/op 0.28030 ns/op 0.87
Throw Error 10000 times 4.2810 us/op 4.4966 us/op 0.95
fastMsgIdFn sha256 / 200 bytes 3.5280 us/op 3.7180 us/op 0.95
fastMsgIdFn h32 xxhash / 200 bytes 302.00 ns/op 338.00 ns/op 0.89
fastMsgIdFn h64 xxhash / 200 bytes 431.00 ns/op 495.00 ns/op 0.87
fastMsgIdFn sha256 / 1000 bytes 11.663 us/op 12.046 us/op 0.97
fastMsgIdFn h32 xxhash / 1000 bytes 442.00 ns/op 467.00 ns/op 0.95
fastMsgIdFn h64 xxhash / 1000 bytes 520.00 ns/op 566.00 ns/op 0.92
fastMsgIdFn sha256 / 10000 bytes 103.53 us/op 107.03 us/op 0.97
fastMsgIdFn h32 xxhash / 10000 bytes 1.9810 us/op 2.0140 us/op 0.98
fastMsgIdFn h64 xxhash / 10000 bytes 1.4120 us/op 1.4640 us/op 0.96
enrSubnets - fastDeserialize 64 bits 1.3620 us/op 1.5380 us/op 0.89
enrSubnets - ssz BitVector 64 bits 530.00 ns/op 584.00 ns/op 0.91
enrSubnets - fastDeserialize 4 bits 207.00 ns/op 220.00 ns/op 0.94
enrSubnets - ssz BitVector 4 bits 593.00 ns/op 627.00 ns/op 0.95
prioritizePeers score -10:0 att 32-0.1 sync 2-0 121.19 us/op 120.17 us/op 1.01
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 144.36 us/op 161.77 us/op 0.89
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 185.48 us/op 209.65 us/op 0.88
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 360.57 us/op 327.07 us/op 1.10
prioritizePeers score 0:0 att 64-1 sync 4-1 433.29 us/op 402.78 us/op 1.08
array of 16000 items push then shift 1.6599 us/op 1.7361 us/op 0.96
LinkedList of 16000 items push then shift 9.0090 ns/op 9.1770 ns/op 0.98
array of 16000 items push then pop 110.03 ns/op 110.00 ns/op 1.00
LinkedList of 16000 items push then pop 8.8020 ns/op 9.4070 ns/op 0.94
array of 24000 items push then shift 2.3601 us/op 2.4759 us/op 0.95
LinkedList of 24000 items push then shift 8.9960 ns/op 9.8900 ns/op 0.91
array of 24000 items push then pop 82.182 ns/op 91.680 ns/op 0.90
LinkedList of 24000 items push then pop 8.7130 ns/op 9.3060 ns/op 0.94
intersect bitArray bitLen 8 13.202 ns/op 13.723 ns/op 0.96
intersect array and set length 8 87.125 ns/op 83.542 ns/op 1.04
intersect bitArray bitLen 128 44.116 ns/op 45.539 ns/op 0.97
intersect array and set length 128 1.1963 us/op 1.1556 us/op 1.04
Buffer.concat 32 items 2.9290 us/op 2.7710 us/op 1.06
Uint8Array.set 32 items 2.3240 us/op 2.4390 us/op 0.95
transfer serialized Status (84 B) 2.1450 us/op 2.2490 us/op 0.95
copy serialized Status (84 B) 1.7930 us/op 1.8400 us/op 0.97
transfer serialized SignedVoluntaryExit (112 B) 2.2540 us/op 2.4480 us/op 0.92
copy serialized SignedVoluntaryExit (112 B) 1.8560 us/op 2.0190 us/op 0.92
transfer serialized ProposerSlashing (416 B) 2.6450 us/op 3.4900 us/op 0.76
copy serialized ProposerSlashing (416 B) 2.7610 us/op 3.5320 us/op 0.78
transfer serialized Attestation (485 B) 2.7890 us/op 3.7290 us/op 0.75
copy serialized Attestation (485 B) 2.7960 us/op 3.4260 us/op 0.82
transfer serialized AttesterSlashing (33232 B) 2.8460 us/op 2.9170 us/op 0.98
copy serialized AttesterSlashing (33232 B) 7.6180 us/op 8.7630 us/op 0.87
transfer serialized Small SignedBeaconBlock (128000 B) 2.7790 us/op 2.8390 us/op 0.98
copy serialized Small SignedBeaconBlock (128000 B) 51.326 us/op 15.958 us/op 3.22
transfer serialized Avg SignedBeaconBlock (200000 B) 3.3030 us/op 3.2980 us/op 1.00
copy serialized Avg SignedBeaconBlock (200000 B) 47.236 us/op 59.243 us/op 0.80
transfer serialized BlobsSidecar (524380 B) 3.7620 us/op 3.3700 us/op 1.12
copy serialized BlobsSidecar (524380 B) 79.049 us/op 85.445 us/op 0.93
transfer serialized Big SignedBeaconBlock (1000000 B) 3.8680 us/op 3.7890 us/op 1.02
copy serialized Big SignedBeaconBlock (1000000 B) 311.93 us/op 288.60 us/op 1.08
pass gossip attestations to forkchoice per slot 2.7981 ms/op 2.8470 ms/op 0.98
forkChoice updateHead vc 100000 bc 64 eq 0 2.1037 ms/op 2.1847 ms/op 0.96
forkChoice updateHead vc 600000 bc 64 eq 0 12.169 ms/op 15.942 ms/op 0.76
forkChoice updateHead vc 1000000 bc 64 eq 0 23.556 ms/op 20.575 ms/op 1.14
forkChoice updateHead vc 600000 bc 320 eq 0 17.455 ms/op 17.710 ms/op 0.99
forkChoice updateHead vc 600000 bc 1200 eq 0 82.399 ms/op 91.442 ms/op 0.90
forkChoice updateHead vc 600000 bc 64 eq 1000 20.792 ms/op 21.987 ms/op 0.95
forkChoice updateHead vc 600000 bc 64 eq 10000 22.795 ms/op 23.873 ms/op 0.95
forkChoice updateHead vc 600000 bc 64 eq 300000 34.994 ms/op 106.00 ms/op 0.33
computeDeltas 3.1785 ms/op 3.3159 ms/op 0.96
computeProposerBoostScoreFromBalances 1.7903 ms/op 1.8379 ms/op 0.97
altair processAttestation - 250000 vs - 7PWei normalcase 2.2476 ms/op 2.5049 ms/op 0.90
altair processAttestation - 250000 vs - 7PWei worstcase 3.5913 ms/op 4.0498 ms/op 0.89
altair processAttestation - setStatus - 1/6 committees join 140.57 us/op 145.29 us/op 0.97
altair processAttestation - setStatus - 1/3 committees join 278.42 us/op 283.43 us/op 0.98
altair processAttestation - setStatus - 1/2 committees join 372.82 us/op 379.46 us/op 0.98
altair processAttestation - setStatus - 2/3 committees join 465.86 us/op 483.44 us/op 0.96
altair processAttestation - setStatus - 4/5 committees join 672.55 us/op 676.42 us/op 0.99
altair processAttestation - setStatus - 100% committees join 777.05 us/op 797.79 us/op 0.97
altair processBlock - 250000 vs - 7PWei normalcase 16.360 ms/op 19.086 ms/op 0.86
altair processBlock - 250000 vs - 7PWei normalcase hashState 25.106 ms/op 31.613 ms/op 0.79
altair processBlock - 250000 vs - 7PWei worstcase 50.456 ms/op 55.832 ms/op 0.90
altair processBlock - 250000 vs - 7PWei worstcase hashState 66.849 ms/op 76.217 ms/op 0.88
phase0 processBlock - 250000 vs - 7PWei normalcase 2.0574 ms/op 2.2408 ms/op 0.92
phase0 processBlock - 250000 vs - 7PWei worstcase 28.382 ms/op 30.290 ms/op 0.94
altair processEth1Data - 250000 vs - 7PWei normalcase 458.75 us/op 505.45 us/op 0.91
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 6.7660 us/op 8.8500 us/op 0.76
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 22.213 us/op 26.525 us/op 0.84
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 9.2920 us/op 12.270 us/op 0.76
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 7.4200 us/op 9.5550 us/op 0.78
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 96.709 us/op 128.24 us/op 0.75
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 668.51 us/op 800.07 us/op 0.84
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 870.68 us/op 1.0857 ms/op 0.80
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 922.28 us/op 1.0354 ms/op 0.89
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.3641 ms/op 3.0146 ms/op 0.78
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.6908 ms/op 1.9482 ms/op 0.87
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.0115 ms/op 5.8147 ms/op 0.69
Tree 40 250000 create 281.24 ms/op 663.83 ms/op 0.42
Tree 40 250000 get(125000) 180.00 ns/op 203.97 ns/op 0.88
Tree 40 250000 set(125000) 893.25 ns/op 1.8696 us/op 0.48
Tree 40 250000 toArray() 18.965 ms/op 24.112 ms/op 0.79
Tree 40 250000 iterate all - toArray() + loop 18.986 ms/op 25.294 ms/op 0.75
Tree 40 250000 iterate all - get(i) 70.407 ms/op 86.990 ms/op 0.81
MutableVector 250000 create 9.1673 ms/op 13.890 ms/op 0.66
MutableVector 250000 get(125000) 6.2960 ns/op 7.7070 ns/op 0.82
MutableVector 250000 set(125000) 264.76 ns/op 559.75 ns/op 0.47
MutableVector 250000 toArray() 2.7135 ms/op 4.3489 ms/op 0.62
MutableVector 250000 iterate all - toArray() + loop 2.8498 ms/op 4.4944 ms/op 0.63
MutableVector 250000 iterate all - get(i) 1.5103 ms/op 1.5978 ms/op 0.95
Array 250000 create 3.0771 ms/op 4.5317 ms/op 0.68
Array 250000 clone - spread 1.0060 ms/op 1.4435 ms/op 0.70
Array 250000 get(125000) 0.50900 ns/op 0.68900 ns/op 0.74
Array 250000 set(125000) 0.58200 ns/op 0.88900 ns/op 0.65
Array 250000 iterate all - loop 102.32 us/op 92.110 us/op 1.11
effectiveBalanceIncrements clone Uint8Array 300000 23.532 us/op 57.114 us/op 0.41
effectiveBalanceIncrements clone MutableVector 300000 311.00 ns/op 432.00 ns/op 0.72
effectiveBalanceIncrements rw all Uint8Array 300000 161.63 us/op 178.49 us/op 0.91
effectiveBalanceIncrements rw all MutableVector 300000 78.698 ms/op 139.83 ms/op 0.56
phase0 afterProcessEpoch - 250000 vs - 7PWei 108.98 ms/op 131.54 ms/op 0.83
phase0 beforeProcessEpoch - 250000 vs - 7PWei 40.266 ms/op 52.433 ms/op 0.77
altair processEpoch - mainnet_e81889 317.38 ms/op 402.01 ms/op 0.79
mainnet_e81889 - altair beforeProcessEpoch 63.714 ms/op 83.201 ms/op 0.77
mainnet_e81889 - altair processJustificationAndFinalization 17.239 us/op 32.121 us/op 0.54
mainnet_e81889 - altair processInactivityUpdates 5.3403 ms/op 6.6697 ms/op 0.80
mainnet_e81889 - altair processRewardsAndPenalties 64.345 ms/op 62.216 ms/op 1.03
mainnet_e81889 - altair processRegistryUpdates 2.8870 us/op 4.7350 us/op 0.61
mainnet_e81889 - altair processSlashings 522.00 ns/op 934.00 ns/op 0.56
mainnet_e81889 - altair processEth1DataReset 492.00 ns/op 1.1380 us/op 0.43
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2505 ms/op 1.5917 ms/op 0.79
mainnet_e81889 - altair processSlashingsReset 4.8300 us/op 7.6920 us/op 0.63
mainnet_e81889 - altair processRandaoMixesReset 4.4510 us/op 8.7950 us/op 0.51
mainnet_e81889 - altair processHistoricalRootsUpdate 1.0070 us/op 1.2510 us/op 0.80
mainnet_e81889 - altair processParticipationFlagUpdates 3.0660 us/op 4.4840 us/op 0.68
mainnet_e81889 - altair processSyncCommitteeUpdates 599.00 ns/op 1.0600 us/op 0.57
mainnet_e81889 - altair afterProcessEpoch 125.87 ms/op 145.60 ms/op 0.86
phase0 processEpoch - mainnet_e58758 370.38 ms/op 422.30 ms/op 0.88
mainnet_e58758 - phase0 beforeProcessEpoch 144.19 ms/op 167.64 ms/op 0.86
mainnet_e58758 - phase0 processJustificationAndFinalization 18.538 us/op 24.856 us/op 0.75
mainnet_e58758 - phase0 processRewardsAndPenalties 61.917 ms/op 66.212 ms/op 0.94
mainnet_e58758 - phase0 processRegistryUpdates 7.5910 us/op 14.518 us/op 0.52
mainnet_e58758 - phase0 processSlashings 511.00 ns/op 1.7410 us/op 0.29
mainnet_e58758 - phase0 processEth1DataReset 453.00 ns/op 599.00 ns/op 0.76
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 973.86 us/op 1.1604 ms/op 0.84
mainnet_e58758 - phase0 processSlashingsReset 3.2750 us/op 4.4770 us/op 0.73
mainnet_e58758 - phase0 processRandaoMixesReset 3.8750 us/op 6.6850 us/op 0.58
mainnet_e58758 - phase0 processHistoricalRootsUpdate 498.00 ns/op 1.8110 us/op 0.27
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.8060 us/op 6.6060 us/op 0.58
mainnet_e58758 - phase0 afterProcessEpoch 95.609 ms/op 111.37 ms/op 0.86
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.2342 ms/op 1.3738 ms/op 0.90
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.5923 ms/op 1.8967 ms/op 0.84
altair processInactivityUpdates - 250000 normalcase 23.066 ms/op 30.613 ms/op 0.75
altair processInactivityUpdates - 250000 worstcase 25.924 ms/op 30.228 ms/op 0.86
phase0 processRegistryUpdates - 250000 normalcase 6.5200 us/op 8.1950 us/op 0.80
phase0 processRegistryUpdates - 250000 badcase_full_deposits 253.43 us/op 315.34 us/op 0.80
phase0 processRegistryUpdates - 250000 worstcase 0.5 116.17 ms/op 138.47 ms/op 0.84
altair processRewardsAndPenalties - 250000 normalcase 63.705 ms/op 67.816 ms/op 0.94
altair processRewardsAndPenalties - 250000 worstcase 68.893 ms/op 77.794 ms/op 0.89
phase0 getAttestationDeltas - 250000 normalcase 6.6575 ms/op 7.4228 ms/op 0.90
phase0 getAttestationDeltas - 250000 worstcase 6.6209 ms/op 7.2559 ms/op 0.91
phase0 processSlashings - 250000 worstcase 3.5511 ms/op 3.9203 ms/op 0.91
altair processSyncCommitteeUpdates - 250000 167.81 ms/op 192.71 ms/op 0.87
BeaconState.hashTreeRoot - No change 325.00 ns/op 317.00 ns/op 1.03
BeaconState.hashTreeRoot - 1 full validator 53.798 us/op 55.884 us/op 0.96
BeaconState.hashTreeRoot - 32 full validator 480.80 us/op 629.66 us/op 0.76
BeaconState.hashTreeRoot - 512 full validator 5.5740 ms/op 6.3435 ms/op 0.88
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 65.300 us/op 69.127 us/op 0.94
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 855.92 us/op 1.0283 ms/op 0.83
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 11.119 ms/op 13.201 ms/op 0.84
BeaconState.hashTreeRoot - 1 balances 51.297 us/op 60.617 us/op 0.85
BeaconState.hashTreeRoot - 32 balances 440.62 us/op 503.51 us/op 0.88
BeaconState.hashTreeRoot - 512 balances 4.3534 ms/op 5.5505 ms/op 0.78
BeaconState.hashTreeRoot - 250000 balances 73.907 ms/op 83.887 ms/op 0.88
aggregationBits - 2048 els - zipIndexesInBitList 15.408 us/op 19.337 us/op 0.80
regular array get 100000 times 32.881 us/op 47.145 us/op 0.70
wrappedArray get 100000 times 33.408 us/op 37.326 us/op 0.90
arrayWithProxy get 100000 times 16.522 ms/op 17.117 ms/op 0.97
ssz.Root.equals 542.00 ns/op 607.00 ns/op 0.89
byteArrayEquals 540.00 ns/op 596.00 ns/op 0.91
shuffle list - 16384 els 6.8244 ms/op 7.2253 ms/op 0.94
shuffle list - 250000 els 99.209 ms/op 106.58 ms/op 0.93
processSlot - 1 slots 8.4920 us/op 10.015 us/op 0.85
processSlot - 32 slots 1.3363 ms/op 1.4946 ms/op 0.89
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 36.598 ms/op 38.351 ms/op 0.95
getCommitteeAssignments - req 1 vs - 250000 vc 2.8898 ms/op 3.2360 ms/op 0.89
getCommitteeAssignments - req 100 vs - 250000 vc 4.1067 ms/op 4.3839 ms/op 0.94
getCommitteeAssignments - req 1000 vs - 250000 vc 4.4425 ms/op 4.8331 ms/op 0.92
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.4100 ns/op 5.4500 ns/op 0.81
state getBlockRootAtSlot - 250000 vs - 7PWei 571.98 ns/op 775.54 ns/op 0.74
computeProposers - vc 250000 10.128 ms/op 12.644 ms/op 0.80
computeEpochShuffling - vc 250000 101.55 ms/op 112.06 ms/op 0.91
getNextSyncCommittee - vc 250000 166.32 ms/op 195.64 ms/op 0.85
computeSigningRoot for AttestationData 12.912 us/op 14.591 us/op 0.88
hash AttestationData serialized data then Buffer.toString(base64) 2.4348 us/op 2.5776 us/op 0.94
toHexString serialized data 1.0682 us/op 1.1818 us/op 0.90
Buffer.toString(base64) 311.71 ns/op 361.76 ns/op 0.86

by benchmarkbot/action

@dapplion dapplion merged commit 7bf0b75 into unstable Jun 1, 2023
@dapplion dapplion deleted the cayman/fix-metrics branch June 1, 2023 05:32
@wemeetagain
Copy link
Member Author

🎉 This PR is included in v1.9.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.

3 participants