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

chore: misc dashboards update #5738

Merged
merged 9 commits into from
Jul 10, 2023
Merged

Conversation

dapplion
Copy link
Contributor

@dapplion dapplion commented Jul 8, 2023

Motivation

After a debugging session I've done multiple changes to dashboards:

  • add missing metrics
  • migrate old graph to timeline
  • adjust sizes
  • add avg_over_time to smooth out data

Plus I noticed that downloading the charts with

node scripts/download_dashboards.mjs

is not deterministic due to fieldConfig.defaults.thresholds sometimes adding value: null sometimes not. Since we do not need those defaults, I've added a lint rule to delete all thresholds. If we ever need them we can review.

@dapplion dapplion requested a review from a team as a code owner July 8, 2023 14:22
@github-actions
Copy link
Contributor

github-actions bot commented Jul 8, 2023

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 771c62d Previous: 1de881b Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 528.92 us/op 984.46 us/op 0.54
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 51.807 us/op 48.839 us/op 1.06
BLS verify - blst-native 1.2988 ms/op 1.2627 ms/op 1.03
BLS verifyMultipleSignatures 3 - blst-native 2.6560 ms/op 2.5589 ms/op 1.04
BLS verifyMultipleSignatures 8 - blst-native 5.5164 ms/op 5.5259 ms/op 1.00
BLS verifyMultipleSignatures 32 - blst-native 19.849 ms/op 20.010 ms/op 0.99
BLS aggregatePubkeys 32 - blst-native 26.715 us/op 26.753 us/op 1.00
BLS aggregatePubkeys 128 - blst-native 104.16 us/op 104.24 us/op 1.00
getAttestationsForBlock 60.842 ms/op 58.667 ms/op 1.04
isKnown best case - 1 super set check 258.00 ns/op 266.00 ns/op 0.97
isKnown normal case - 2 super set checks 256.00 ns/op 255.00 ns/op 1.00
isKnown worse case - 16 super set checks 262.00 ns/op 255.00 ns/op 1.03
CheckpointStateCache - add get delete 5.9420 us/op 5.8060 us/op 1.02
validate gossip signedAggregateAndProof - struct 2.8647 ms/op 2.8317 ms/op 1.01
validate gossip attestation - struct 1.3770 ms/op 1.3537 ms/op 1.02
pickEth1Vote - no votes 1.3379 ms/op 1.3381 ms/op 1.00
pickEth1Vote - max votes 11.888 ms/op 11.704 ms/op 1.02
pickEth1Vote - Eth1Data hashTreeRoot value x2048 9.5757 ms/op 9.3203 ms/op 1.03
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 16.096 ms/op 16.628 ms/op 0.97
pickEth1Vote - Eth1Data fastSerialize value x2048 727.76 us/op 740.25 us/op 0.98
pickEth1Vote - Eth1Data fastSerialize tree x2048 8.8408 ms/op 5.2671 ms/op 1.68
bytes32 toHexString 567.00 ns/op 549.00 ns/op 1.03
bytes32 Buffer.toString(hex) 401.00 ns/op 390.00 ns/op 1.03
bytes32 Buffer.toString(hex) from Uint8Array 611.00 ns/op 604.00 ns/op 1.01
bytes32 Buffer.toString(hex) + 0x 418.00 ns/op 397.00 ns/op 1.05
Object access 1 prop 0.18000 ns/op 0.18000 ns/op 1.00
Map access 1 prop 0.16300 ns/op 0.16400 ns/op 0.99
Object get x1000 7.0300 ns/op 6.6030 ns/op 1.06
Map get x1000 0.65700 ns/op 0.64500 ns/op 1.02
Object set x1000 66.079 ns/op 59.775 ns/op 1.11
Map set x1000 46.778 ns/op 47.754 ns/op 0.98
Return object 10000 times 0.25340 ns/op 0.24880 ns/op 1.02
Throw Error 10000 times 4.4599 us/op 4.4212 us/op 1.01
fastMsgIdFn sha256 / 200 bytes 3.6980 us/op 3.7200 us/op 0.99
fastMsgIdFn h32 xxhash / 200 bytes 309.00 ns/op 334.00 ns/op 0.93
fastMsgIdFn h64 xxhash / 200 bytes 453.00 ns/op 452.00 ns/op 1.00
fastMsgIdFn sha256 / 1000 bytes 11.980 us/op 12.005 us/op 1.00
fastMsgIdFn h32 xxhash / 1000 bytes 419.00 ns/op 456.00 ns/op 0.92
fastMsgIdFn h64 xxhash / 1000 bytes 516.00 ns/op 521.00 ns/op 0.99
fastMsgIdFn sha256 / 10000 bytes 106.97 us/op 106.31 us/op 1.01
fastMsgIdFn h32 xxhash / 10000 bytes 2.0210 us/op 2.0300 us/op 1.00
fastMsgIdFn h64 xxhash / 10000 bytes 1.4700 us/op 1.4630 us/op 1.00
enrSubnets - fastDeserialize 64 bits 1.3650 us/op 1.4460 us/op 0.94
enrSubnets - ssz BitVector 64 bits 561.00 ns/op 586.00 ns/op 0.96
enrSubnets - fastDeserialize 4 bits 183.00 ns/op 194.00 ns/op 0.94
enrSubnets - ssz BitVector 4 bits 600.00 ns/op 552.00 ns/op 1.09
prioritizePeers score -10:0 att 32-0.1 sync 2-0 115.28 us/op 120.53 us/op 0.96
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 176.00 us/op 159.66 us/op 1.10
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 191.31 us/op 193.01 us/op 0.99
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 361.32 us/op 360.78 us/op 1.00
prioritizePeers score 0:0 att 64-1 sync 4-1 448.60 us/op 443.84 us/op 1.01
array of 16000 items push then shift 1.7446 us/op 1.7121 us/op 1.02
LinkedList of 16000 items push then shift 9.2900 ns/op 9.2090 ns/op 1.01
array of 16000 items push then pop 113.02 ns/op 111.60 ns/op 1.01
LinkedList of 16000 items push then pop 9.6400 ns/op 8.9420 ns/op 1.08
array of 24000 items push then shift 2.4692 us/op 2.4249 us/op 1.02
LinkedList of 24000 items push then shift 9.4590 ns/op 9.7730 ns/op 0.97
array of 24000 items push then pop 86.654 ns/op 91.895 ns/op 0.94
LinkedList of 24000 items push then pop 9.5110 ns/op 9.4110 ns/op 1.01
intersect bitArray bitLen 8 14.012 ns/op 14.079 ns/op 1.00
intersect array and set length 8 90.843 ns/op 84.893 ns/op 1.07
intersect bitArray bitLen 128 47.652 ns/op 46.338 ns/op 1.03
intersect array and set length 128 1.2313 us/op 1.1663 us/op 1.06
Buffer.concat 32 items 3.0930 us/op 3.0450 us/op 1.02
Uint8Array.set 32 items 2.7500 us/op 2.3010 us/op 1.20
transfer serialized Status (84 B) 2.2790 us/op 2.1190 us/op 1.08
copy serialized Status (84 B) 1.8380 us/op 1.8050 us/op 1.02
transfer serialized SignedVoluntaryExit (112 B) 2.3670 us/op 2.1600 us/op 1.10
copy serialized SignedVoluntaryExit (112 B) 1.9600 us/op 1.7610 us/op 1.11
transfer serialized ProposerSlashing (416 B) 2.9100 us/op 2.4540 us/op 1.19
copy serialized ProposerSlashing (416 B) 3.1120 us/op 2.8360 us/op 1.10
transfer serialized Attestation (485 B) 3.3160 us/op 2.4520 us/op 1.35
copy serialized Attestation (485 B) 2.5970 us/op 2.1140 us/op 1.23
transfer serialized AttesterSlashing (33232 B) 2.9160 us/op 2.5240 us/op 1.16
copy serialized AttesterSlashing (33232 B) 9.6180 us/op 6.2040 us/op 1.55
transfer serialized Small SignedBeaconBlock (128000 B) 3.1180 us/op 2.9310 us/op 1.06
copy serialized Small SignedBeaconBlock (128000 B) 25.108 us/op 16.968 us/op 1.48
transfer serialized Avg SignedBeaconBlock (200000 B) 3.5150 us/op 3.2320 us/op 1.09
copy serialized Avg SignedBeaconBlock (200000 B) 44.680 us/op 20.748 us/op 2.15
transfer serialized BlobsSidecar (524380 B) 4.1340 us/op 3.3390 us/op 1.24
copy serialized BlobsSidecar (524380 B) 211.83 us/op 76.840 us/op 2.76
transfer serialized Big SignedBeaconBlock (1000000 B) 4.0670 us/op 3.8280 us/op 1.06
copy serialized Big SignedBeaconBlock (1000000 B) 376.17 us/op 258.18 us/op 1.46
pass gossip attestations to forkchoice per slot 2.8515 ms/op 2.9253 ms/op 0.97
forkChoice updateHead vc 100000 bc 64 eq 0 2.2517 ms/op 2.1549 ms/op 1.04
forkChoice updateHead vc 600000 bc 64 eq 0 12.972 ms/op 12.488 ms/op 1.04
forkChoice updateHead vc 1000000 bc 64 eq 0 26.537 ms/op 24.177 ms/op 1.10
forkChoice updateHead vc 600000 bc 320 eq 0 18.445 ms/op 17.458 ms/op 1.06
forkChoice updateHead vc 600000 bc 1200 eq 0 100.00 ms/op 90.044 ms/op 1.11
forkChoice updateHead vc 600000 bc 64 eq 1000 22.247 ms/op 22.252 ms/op 1.00
forkChoice updateHead vc 600000 bc 64 eq 10000 24.124 ms/op 24.022 ms/op 1.00
forkChoice updateHead vc 600000 bc 64 eq 300000 38.275 ms/op 33.278 ms/op 1.15
computeDeltas 3.4113 ms/op 3.2723 ms/op 1.04
computeProposerBoostScoreFromBalances 1.9321 ms/op 2.0087 ms/op 0.96
altair processAttestation - 250000 vs - 7PWei normalcase 3.3034 ms/op 3.4879 ms/op 0.95
altair processAttestation - 250000 vs - 7PWei worstcase 6.5722 ms/op 5.1668 ms/op 1.27
altair processAttestation - setStatus - 1/6 committees join 150.95 us/op 158.78 us/op 0.95
altair processAttestation - setStatus - 1/3 committees join 338.70 us/op 311.97 us/op 1.09
altair processAttestation - setStatus - 1/2 committees join 420.00 us/op 413.01 us/op 1.02
altair processAttestation - setStatus - 2/3 committees join 540.64 us/op 524.75 us/op 1.03
altair processAttestation - setStatus - 4/5 committees join 700.11 us/op 751.72 us/op 0.93
altair processAttestation - setStatus - 100% committees join 915.35 us/op 889.19 us/op 1.03
altair processBlock - 250000 vs - 7PWei normalcase 21.084 ms/op 22.993 ms/op 0.92
altair processBlock - 250000 vs - 7PWei normalcase hashState 32.474 ms/op 31.703 ms/op 1.02
altair processBlock - 250000 vs - 7PWei worstcase 55.366 ms/op 66.383 ms/op 0.83
altair processBlock - 250000 vs - 7PWei worstcase hashState 81.274 ms/op 88.704 ms/op 0.92
phase0 processBlock - 250000 vs - 7PWei normalcase 2.7926 ms/op 2.8287 ms/op 0.99
phase0 processBlock - 250000 vs - 7PWei worstcase 35.663 ms/op 36.698 ms/op 0.97
altair processEth1Data - 250000 vs - 7PWei normalcase 636.20 us/op 653.72 us/op 0.97
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 11.777 us/op 12.857 us/op 0.92
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 33.968 us/op 34.819 us/op 0.98
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 13.961 us/op 13.932 us/op 1.00
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 11.307 us/op 9.3570 us/op 1.21
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 110.67 us/op 112.12 us/op 0.99
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 739.73 us/op 708.70 us/op 1.04
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.0524 ms/op 926.93 us/op 1.14
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 982.70 us/op 929.15 us/op 1.06
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.6822 ms/op 2.8703 ms/op 0.93
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.6683 ms/op 1.6444 ms/op 1.01
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.4507 ms/op 4.8783 ms/op 0.91
Tree 40 250000 create 331.39 ms/op 383.95 ms/op 0.86
Tree 40 250000 get(125000) 204.66 ns/op 215.83 ns/op 0.95
Tree 40 250000 set(125000) 1.0707 us/op 1.1681 us/op 0.92
Tree 40 250000 toArray() 22.326 ms/op 24.148 ms/op 0.92
Tree 40 250000 iterate all - toArray() + loop 22.486 ms/op 24.631 ms/op 0.91
Tree 40 250000 iterate all - get(i) 80.940 ms/op 81.581 ms/op 0.99
MutableVector 250000 create 12.779 ms/op 12.367 ms/op 1.03
MutableVector 250000 get(125000) 9.4770 ns/op 6.8660 ns/op 1.38
MutableVector 250000 set(125000) 434.15 ns/op 331.76 ns/op 1.31
MutableVector 250000 toArray() 3.8786 ms/op 4.6915 ms/op 0.83
MutableVector 250000 iterate all - toArray() + loop 3.9833 ms/op 4.3761 ms/op 0.91
MutableVector 250000 iterate all - get(i) 1.8436 ms/op 1.6486 ms/op 1.12
Array 250000 create 3.5154 ms/op 3.7896 ms/op 0.93
Array 250000 clone - spread 1.2835 ms/op 1.3139 ms/op 0.98
Array 250000 get(125000) 0.60000 ns/op 0.60700 ns/op 0.99
Array 250000 set(125000) 0.77800 ns/op 0.68700 ns/op 1.13
Array 250000 iterate all - loop 89.992 us/op 93.991 us/op 0.96
effectiveBalanceIncrements clone Uint8Array 300000 36.634 us/op 43.743 us/op 0.84
effectiveBalanceIncrements clone MutableVector 300000 349.00 ns/op 377.00 ns/op 0.93
effectiveBalanceIncrements rw all Uint8Array 300000 183.34 us/op 179.12 us/op 1.02
effectiveBalanceIncrements rw all MutableVector 300000 105.50 ms/op 94.461 ms/op 1.12
phase0 afterProcessEpoch - 250000 vs - 7PWei 124.64 ms/op 130.47 ms/op 0.96
phase0 beforeProcessEpoch - 250000 vs - 7PWei 48.439 ms/op 44.216 ms/op 1.10
altair processEpoch - mainnet_e81889 367.80 ms/op 338.86 ms/op 1.09
mainnet_e81889 - altair beforeProcessEpoch 77.336 ms/op 68.892 ms/op 1.12
mainnet_e81889 - altair processJustificationAndFinalization 16.790 us/op 17.714 us/op 0.95
mainnet_e81889 - altair processInactivityUpdates 5.5541 ms/op 5.8193 ms/op 0.95
mainnet_e81889 - altair processRewardsAndPenalties 68.047 ms/op 66.402 ms/op 1.02
mainnet_e81889 - altair processRegistryUpdates 5.7470 us/op 2.7130 us/op 2.12
mainnet_e81889 - altair processSlashings 540.00 ns/op 514.00 ns/op 1.05
mainnet_e81889 - altair processEth1DataReset 773.00 ns/op 563.00 ns/op 1.37
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2955 ms/op 1.3490 ms/op 0.96
mainnet_e81889 - altair processSlashingsReset 5.0160 us/op 4.2900 us/op 1.17
mainnet_e81889 - altair processRandaoMixesReset 6.6660 us/op 10.727 us/op 0.62
mainnet_e81889 - altair processHistoricalRootsUpdate 1.6090 us/op 2.2930 us/op 0.70
mainnet_e81889 - altair processParticipationFlagUpdates 4.6210 us/op 3.4640 us/op 1.33
mainnet_e81889 - altair processSyncCommitteeUpdates 866.00 ns/op 1.1210 us/op 0.77
mainnet_e81889 - altair afterProcessEpoch 134.82 ms/op 134.66 ms/op 1.00
phase0 processEpoch - mainnet_e58758 436.48 ms/op 407.14 ms/op 1.07
mainnet_e58758 - phase0 beforeProcessEpoch 176.42 ms/op 166.38 ms/op 1.06
mainnet_e58758 - phase0 processJustificationAndFinalization 25.893 us/op 24.653 us/op 1.05
mainnet_e58758 - phase0 processRewardsAndPenalties 68.895 ms/op 72.179 ms/op 0.95
mainnet_e58758 - phase0 processRegistryUpdates 14.459 us/op 8.7240 us/op 1.66
mainnet_e58758 - phase0 processSlashings 1.0480 us/op 1.1390 us/op 0.92
mainnet_e58758 - phase0 processEth1DataReset 608.00 ns/op 552.00 ns/op 1.10
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.2247 ms/op 1.0531 ms/op 1.16
mainnet_e58758 - phase0 processSlashingsReset 6.2710 us/op 4.3310 us/op 1.45
mainnet_e58758 - phase0 processRandaoMixesReset 7.1340 us/op 4.9150 us/op 1.45
mainnet_e58758 - phase0 processHistoricalRootsUpdate 889.00 ns/op 997.00 ns/op 0.89
mainnet_e58758 - phase0 processParticipationRecordUpdates 6.0680 us/op 5.2720 us/op 1.15
mainnet_e58758 - phase0 afterProcessEpoch 107.03 ms/op 102.28 ms/op 1.05
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.4108 ms/op 1.2997 ms/op 1.09
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.4235 ms/op 1.6501 ms/op 1.47
altair processInactivityUpdates - 250000 normalcase 31.144 ms/op 26.447 ms/op 1.18
altair processInactivityUpdates - 250000 worstcase 33.014 ms/op 27.062 ms/op 1.22
phase0 processRegistryUpdates - 250000 normalcase 10.249 us/op 7.5320 us/op 1.36
phase0 processRegistryUpdates - 250000 badcase_full_deposits 312.90 us/op 266.04 us/op 1.18
phase0 processRegistryUpdates - 250000 worstcase 0.5 170.03 ms/op 130.00 ms/op 1.31
altair processRewardsAndPenalties - 250000 normalcase 79.837 ms/op 68.428 ms/op 1.17
altair processRewardsAndPenalties - 250000 worstcase 78.307 ms/op 70.486 ms/op 1.11
phase0 getAttestationDeltas - 250000 normalcase 9.9709 ms/op 7.7426 ms/op 1.29
phase0 getAttestationDeltas - 250000 worstcase 9.9542 ms/op 6.9577 ms/op 1.43
phase0 processSlashings - 250000 worstcase 4.2266 ms/op 3.7399 ms/op 1.13
altair processSyncCommitteeUpdates - 250000 202.69 ms/op 183.80 ms/op 1.10
BeaconState.hashTreeRoot - No change 399.00 ns/op 271.00 ns/op 1.47
BeaconState.hashTreeRoot - 1 full validator 56.861 us/op 54.495 us/op 1.04
BeaconState.hashTreeRoot - 32 full validator 559.63 us/op 496.24 us/op 1.13
BeaconState.hashTreeRoot - 512 full validator 7.2818 ms/op 5.1719 ms/op 1.41
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 70.903 us/op 68.020 us/op 1.04
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.0405 ms/op 912.45 us/op 1.14
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 13.550 ms/op 12.173 ms/op 1.11
BeaconState.hashTreeRoot - 1 balances 52.569 us/op 51.570 us/op 1.02
BeaconState.hashTreeRoot - 32 balances 468.58 us/op 467.63 us/op 1.00
BeaconState.hashTreeRoot - 512 balances 4.6887 ms/op 4.3964 ms/op 1.07
BeaconState.hashTreeRoot - 250000 balances 80.932 ms/op 78.123 ms/op 1.04
aggregationBits - 2048 els - zipIndexesInBitList 17.002 us/op 17.208 us/op 0.99
regular array get 100000 times 46.047 us/op 34.031 us/op 1.35
wrappedArray get 100000 times 36.502 us/op 34.113 us/op 1.07
arrayWithProxy get 100000 times 17.552 ms/op 17.674 ms/op 0.99
ssz.Root.equals 584.00 ns/op 569.00 ns/op 1.03
byteArrayEquals 583.00 ns/op 572.00 ns/op 1.02
shuffle list - 16384 els 7.7960 ms/op 7.0876 ms/op 1.10
shuffle list - 250000 els 106.07 ms/op 104.13 ms/op 1.02
processSlot - 1 slots 9.1320 us/op 9.4990 us/op 0.96
processSlot - 32 slots 1.4434 ms/op 1.3933 ms/op 1.04
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 36.824 ms/op 36.077 ms/op 1.02
getCommitteeAssignments - req 1 vs - 250000 vc 2.9790 ms/op 3.0018 ms/op 0.99
getCommitteeAssignments - req 100 vs - 250000 vc 4.2449 ms/op 4.2662 ms/op 1.00
getCommitteeAssignments - req 1000 vs - 250000 vc 4.6864 ms/op 4.5952 ms/op 1.02
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.1200 ns/op 4.9100 ns/op 1.04
state getBlockRootAtSlot - 250000 vs - 7PWei 966.67 ns/op 616.77 ns/op 1.57
computeProposers - vc 250000 10.494 ms/op 11.119 ms/op 0.94
computeEpochShuffling - vc 250000 107.57 ms/op 108.83 ms/op 0.99
getNextSyncCommittee - vc 250000 177.49 ms/op 195.11 ms/op 0.91
computeSigningRoot for AttestationData 13.232 us/op 14.130 us/op 0.94
hash AttestationData serialized data then Buffer.toString(base64) 2.5104 us/op 2.5838 us/op 0.97
toHexString serialized data 1.1046 us/op 1.2612 us/op 0.88
Buffer.toString(base64) 317.73 ns/op 346.90 ns/op 0.92

by benchmarkbot/action

@dapplion dapplion changed the title Misc dashboards update chore: misc dashboards update Jul 8, 2023
matthewkeil
matthewkeil previously approved these changes Jul 9, 2023
Copy link
Member

@matthewkeil matthewkeil left a comment

Choose a reason for hiding this comment

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

This is awesome! I am really glad you started this process. I was thinking one of the next things I attempt is to clean up the dashboards a bit and perhaps reorganize them a bit. I will put up an issue to discuss and see how the team feels when I finish with the tasks I am working on.

@@ -599,7 +519,7 @@
"pluginVersion": "7.4.5",
"targets": [
{
"expr": "delta(lodestar_bls_thread_pool_queue_job_wait_time_seconds_sum[$rate_interval])/delta(lodestar_bls_thread_pool_queue_job_wait_time_seconds_count[$rate_interval])",
"expr": "rate(lodestar_bls_thread_pool_queue_job_wait_time_seconds_sum[$rate_interval])/rate(lodestar_bls_thread_pool_queue_job_wait_time_seconds_count[$rate_interval])",
Copy link
Member

Choose a reason for hiding this comment

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

Quick question. I noticed that you made this change in many places. I read the docs for both function and the major difference is the tolerance to restarts not skewing metrics. Is that the reason you made this change? Or was it directly related to how the calculation happens?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

delta() / delta() should behave like rate() / rate(). But just delta() is very different read to just rate(). Many times I been reading a chart, think this numbers are impossible! And then found out it was a delta 😒 . For this reason I impose a strict rate() only usage across the board to keep things consistent.

dashboards/lodestar_debug_gossipsub.json Show resolved Hide resolved
"hide": false,
"legendFormat": "notifyNewPayload roundtrip",
"range": true,
"interval": "",
Copy link
Member

Choose a reason for hiding this comment

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

Out of curiosity, what does the empty interval here do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No idea grafana exports add so much random crap

@@ -3425,8 +3140,8 @@
"mode": "scheme",
"reverse": false,
"scale": "exponential",
"scheme": "Oranges",
"steps": 64
"scheme": "Magma",
Copy link
Member

Choose a reason for hiding this comment

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

🔥

@@ -1059,7 +1196,7 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": false,
"expr": "32*12*rate(validator_monitor_prev_epoch_on_chain_inclusion_distance_bucket [$rate_interval])",
"expr": "32*12*rate(validator_monitor_prev_epoch_on_chain_inclusion_distance_bucket [$rate_interval]) - 10000",
Copy link
Member

Choose a reason for hiding this comment

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

Interesting. Why the scalar reduction? Would love to learn from this!

Copy link
Member

Choose a reason for hiding this comment

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

I see that this was a metric that was moved from below. Still curious about the scalar though. Will look when I load the dashboards to see how things change. Feel free to learn me somethin'!!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The contant substraction causes heatmaps to ignore the first row. This is very useful in histograms where the first bucket (inclusion distance 1) takes 99% of the values, but you want good resolution of the other values. Without this trick, non 1 values are dark, and with this they pop and are readable.

Comment on lines +332 to +337
if (target.expr.includes("delta(")) {
throw Error(`promql function 'delta' is not allowed, use 'rate' instead: ${target.expr}`);
}
if (target.expr.includes("increase(")) {
throw Error(`promql function 'increase' is not allowed, use 'rate' instead: ${target.expr}`);
}
Copy link
Member

Choose a reason for hiding this comment

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

Should we also disallow "decrease"?

Suggested change
if (target.expr.includes("delta(")) {
throw Error(`promql function 'delta' is not allowed, use 'rate' instead: ${target.expr}`);
}
if (target.expr.includes("increase(")) {
throw Error(`promql function 'increase' is not allowed, use 'rate' instead: ${target.expr}`);
}
const disallowed = ["delta", "increase", "decrease"];
for (const disallow of disallowed) {
if (target.expr.includes(disallow + "(")) {
throw Error(`promql function '${disallow}' is not allowed, use 'rate' instead: ${target.expr}`);
}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can't imagine anyone using decrease ever

@@ -1030,7 +941,7 @@
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "nodejs_eventloop_lag_seconds",
"expr": "nodejs_eventloop_lag_seconds{job=\"beacon\"}",
Copy link
Member

@nflaig nflaig Jul 10, 2023

Choose a reason for hiding this comment

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

Job name variable needs to be supported, else job name is not configurable

Suggested change
"expr": "nodejs_eventloop_lag_seconds{job=\"beacon\"}",
"expr": "nodejs_eventloop_lag_seconds{job=~\"$beacon_job|beacon\"}",

Edit: Updated lint script to ensure this ☝️

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point! We should add a lint rule for it

dashboards/lodestar_networking.json Outdated Show resolved Hide resolved
scripts/lint-grafana-dashboard.mjs Outdated Show resolved Hide resolved
@@ -10,6 +10,7 @@ import fs from "node:fs";
@typescript-eslint/no-unsafe-assignment,
@typescript-eslint/explicit-function-return-type,
@typescript-eslint/naming-convention,
quotes,
Copy link
Member

Choose a reason for hiding this comment

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

There is a conflict between eslint and prettier if you try to defined a string such as 'job=~"$beacon_job|beacon"', it won't let you escape double quotes \" and eslint will complain if single quote or backtick is used.

@wemeetagain wemeetagain merged commit b596000 into unstable Jul 10, 2023
12 checks passed
@wemeetagain wemeetagain deleted the dapplion/update-dashboards branch July 10, 2023 13:54
@wemeetagain
Copy link
Member

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

None yet

4 participants