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: grafana dashboard lint rules for API exports #5526

Merged
merged 1 commit into from
May 24, 2023

Conversation

dapplion
Copy link
Contributor

Motivation

Description

To ensure the download command is deterministic we need more linter rules. Using the HTTP API does not allow to set "Export for sharing externally" to true. So the fields starting with __ must be set manually, see https://community.grafana.com/t/export-dashboard-for-external-use-via-http-api/50716

  • Force all panels to be expanded. Toggling expand is huge source of big diffs. By forcing panels to always be expanded there's less opportunity for diff and gives full visibility to panels. If a dashboard now feels to long, it should be split into two, not collapsed.
  • Insert fixed __inputs field and remove __requirements

@github-actions
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: e16c9c6 Previous: 0b9ad0b Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 602.24 us/op 964.52 us/op 0.62
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 52.059 us/op 54.623 us/op 0.95
BLS verify - blst-native 1.2784 ms/op 1.2562 ms/op 1.02
BLS verifyMultipleSignatures 3 - blst-native 2.5877 ms/op 2.5531 ms/op 1.01
BLS verifyMultipleSignatures 8 - blst-native 5.7172 ms/op 5.4381 ms/op 1.05
BLS verifyMultipleSignatures 32 - blst-native 20.024 ms/op 19.785 ms/op 1.01
BLS aggregatePubkeys 32 - blst-native 27.000 us/op 26.450 us/op 1.02
BLS aggregatePubkeys 128 - blst-native 104.61 us/op 103.57 us/op 1.01
getAttestationsForBlock 57.290 ms/op 62.685 ms/op 0.91
isKnown best case - 1 super set check 268.00 ns/op 269.00 ns/op 1.00
isKnown normal case - 2 super set checks 265.00 ns/op 264.00 ns/op 1.00
isKnown worse case - 16 super set checks 265.00 ns/op 264.00 ns/op 1.00
CheckpointStateCache - add get delete 5.3010 us/op 5.5990 us/op 0.95
validate gossip signedAggregateAndProof - struct 2.8689 ms/op 2.8651 ms/op 1.00
validate gossip attestation - struct 1.3893 ms/op 1.3572 ms/op 1.02
pickEth1Vote - no votes 1.2836 ms/op 1.3506 ms/op 0.95
pickEth1Vote - max votes 12.461 ms/op 10.930 ms/op 1.14
pickEth1Vote - Eth1Data hashTreeRoot value x2048 9.8113 ms/op 9.2212 ms/op 1.06
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 15.659 ms/op 15.034 ms/op 1.04
pickEth1Vote - Eth1Data fastSerialize value x2048 743.03 us/op 648.84 us/op 1.15
pickEth1Vote - Eth1Data fastSerialize tree x2048 5.4874 ms/op 4.7663 ms/op 1.15
bytes32 toHexString 540.00 ns/op 535.00 ns/op 1.01
bytes32 Buffer.toString(hex) 387.00 ns/op 409.00 ns/op 0.95
bytes32 Buffer.toString(hex) from Uint8Array 608.00 ns/op 600.00 ns/op 1.01
bytes32 Buffer.toString(hex) + 0x 430.00 ns/op 399.00 ns/op 1.08
Object access 1 prop 0.18600 ns/op 0.18100 ns/op 1.03
Map access 1 prop 0.16800 ns/op 0.18000 ns/op 0.93
Object get x1000 6.7460 ns/op 7.2260 ns/op 0.93
Map get x1000 0.61800 ns/op 0.69300 ns/op 0.89
Object set x1000 60.197 ns/op 56.222 ns/op 1.07
Map set x1000 48.437 ns/op 44.937 ns/op 1.08
Return object 10000 times 0.25020 ns/op 0.25250 ns/op 0.99
Throw Error 10000 times 4.3097 us/op 4.3549 us/op 0.99
fastMsgIdFn sha256 / 200 bytes 3.5530 us/op 3.5670 us/op 1.00
fastMsgIdFn h32 xxhash / 200 bytes 337.00 ns/op 298.00 ns/op 1.13
fastMsgIdFn h64 xxhash / 200 bytes 447.00 ns/op 414.00 ns/op 1.08
fastMsgIdFn sha256 / 1000 bytes 11.877 us/op 11.997 us/op 0.99
fastMsgIdFn h32 xxhash / 1000 bytes 446.00 ns/op 430.00 ns/op 1.04
fastMsgIdFn h64 xxhash / 1000 bytes 495.00 ns/op 491.00 ns/op 1.01
fastMsgIdFn sha256 / 10000 bytes 105.53 us/op 106.14 us/op 0.99
fastMsgIdFn h32 xxhash / 10000 bytes 1.9730 us/op 2.0040 us/op 0.98
fastMsgIdFn h64 xxhash / 10000 bytes 1.4240 us/op 1.4380 us/op 0.99
enrSubnets - fastDeserialize 64 bits 1.3390 us/op 1.3720 us/op 0.98
enrSubnets - ssz BitVector 64 bits 507.00 ns/op 514.00 ns/op 0.99
enrSubnets - fastDeserialize 4 bits 184.00 ns/op 195.00 ns/op 0.94
enrSubnets - ssz BitVector 4 bits 503.00 ns/op 599.00 ns/op 0.84
prioritizePeers score -10:0 att 32-0.1 sync 2-0 106.17 us/op 116.70 us/op 0.91
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 140.67 us/op 152.68 us/op 0.92
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 172.87 us/op 167.45 us/op 1.03
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 312.98 us/op 319.71 us/op 0.98
prioritizePeers score 0:0 att 64-1 sync 4-1 366.85 us/op 391.16 us/op 0.94
array of 16000 items push then shift 1.6665 us/op 1.7092 us/op 0.98
LinkedList of 16000 items push then shift 8.9790 ns/op 9.3750 ns/op 0.96
array of 16000 items push then pop 99.468 ns/op 101.34 ns/op 0.98
LinkedList of 16000 items push then pop 8.8010 ns/op 8.8630 ns/op 0.99
array of 24000 items push then shift 2.3853 us/op 2.4371 us/op 0.98
LinkedList of 24000 items push then shift 9.0390 ns/op 9.3780 ns/op 0.96
array of 24000 items push then pop 79.108 ns/op 81.000 ns/op 0.98
LinkedList of 24000 items push then pop 8.7680 ns/op 8.8840 ns/op 0.99
intersect bitArray bitLen 8 13.694 ns/op 14.186 ns/op 0.97
intersect array and set length 8 82.556 ns/op 79.382 ns/op 1.04
intersect bitArray bitLen 128 45.349 ns/op 46.646 ns/op 0.97
intersect array and set length 128 1.1080 us/op 1.0913 us/op 1.02
Buffer.concat 32 items 2.9870 us/op 2.7930 us/op 1.07
Uint8Array.set 32 items 2.6260 us/op 3.2410 us/op 0.81
pass gossip attestations to forkchoice per slot 2.6723 ms/op 2.9173 ms/op 0.92
computeDeltas 2.9949 ms/op 3.1175 ms/op 0.96
computeProposerBoostScoreFromBalances 1.7929 ms/op 1.8271 ms/op 0.98
altair processAttestation - 250000 vs - 7PWei normalcase 2.3176 ms/op 2.7575 ms/op 0.84
altair processAttestation - 250000 vs - 7PWei worstcase 4.0403 ms/op 3.6208 ms/op 1.12
altair processAttestation - setStatus - 1/6 committees join 148.83 us/op 147.72 us/op 1.01
altair processAttestation - setStatus - 1/3 committees join 289.19 us/op 289.21 us/op 1.00
altair processAttestation - setStatus - 1/2 committees join 412.15 us/op 387.96 us/op 1.06
altair processAttestation - setStatus - 2/3 committees join 493.79 us/op 482.68 us/op 1.02
altair processAttestation - setStatus - 4/5 committees join 680.25 us/op 661.84 us/op 1.03
altair processAttestation - setStatus - 100% committees join 799.05 us/op 791.15 us/op 1.01
altair processBlock - 250000 vs - 7PWei normalcase 18.092 ms/op 19.314 ms/op 0.94
altair processBlock - 250000 vs - 7PWei normalcase hashState 29.063 ms/op 28.990 ms/op 1.00
altair processBlock - 250000 vs - 7PWei worstcase 58.791 ms/op 49.446 ms/op 1.19
altair processBlock - 250000 vs - 7PWei worstcase hashState 70.165 ms/op 73.818 ms/op 0.95
phase0 processBlock - 250000 vs - 7PWei normalcase 2.0892 ms/op 2.2196 ms/op 0.94
phase0 processBlock - 250000 vs - 7PWei worstcase 28.942 ms/op 30.962 ms/op 0.93
altair processEth1Data - 250000 vs - 7PWei normalcase 500.69 us/op 523.72 us/op 0.96
vc - 250000 eb 1 eth1 1 we 0 wn 0 - smpl 15 9.5250 us/op 9.1440 us/op 1.04
vc - 250000 eb 0.95 eth1 0.1 we 0.05 wn 0 - smpl 219 33.272 us/op 26.870 us/op 1.24
vc - 250000 eb 0.95 eth1 0.3 we 0.05 wn 0 - smpl 42 13.559 us/op 10.964 us/op 1.24
vc - 250000 eb 0.95 eth1 0.7 we 0.05 wn 0 - smpl 18 9.5020 us/op 8.2810 us/op 1.15
vc - 250000 eb 0.1 eth1 0.1 we 0 wn 0 - smpl 1020 143.88 us/op 111.29 us/op 1.29
vc - 250000 eb 0.03 eth1 0.03 we 0 wn 0 - smpl 11777 682.50 us/op 643.63 us/op 1.06
vc - 250000 eb 0.01 eth1 0.01 we 0 wn 0 - smpl 16384 917.63 us/op 934.02 us/op 0.98
vc - 250000 eb 0 eth1 0 we 0 wn 0 - smpl 16384 939.76 us/op 901.02 us/op 1.04
vc - 250000 eb 0 eth1 0 we 0 wn 0 nocache - smpl 16384 2.7435 ms/op 2.3187 ms/op 1.18
vc - 250000 eb 0 eth1 1 we 0 wn 0 - smpl 16384 1.6728 ms/op 1.7364 ms/op 0.96
vc - 250000 eb 0 eth1 1 we 0 wn 0 nocache - smpl 16384 4.8118 ms/op 4.2131 ms/op 1.14
Tree 40 250000 create 411.13 ms/op 345.90 ms/op 1.19
Tree 40 250000 get(125000) 202.75 ns/op 195.11 ns/op 1.04
Tree 40 250000 set(125000) 1.0772 us/op 1.0662 us/op 1.01
Tree 40 250000 toArray() 22.929 ms/op 23.152 ms/op 0.99
Tree 40 250000 iterate all - toArray() + loop 22.241 ms/op 23.289 ms/op 0.95
Tree 40 250000 iterate all - get(i) 76.606 ms/op 76.309 ms/op 1.00
MutableVector 250000 create 11.647 ms/op 13.113 ms/op 0.89
MutableVector 250000 get(125000) 6.6730 ns/op 6.4220 ns/op 1.04
MutableVector 250000 set(125000) 276.81 ns/op 272.49 ns/op 1.02
MutableVector 250000 toArray() 2.9270 ms/op 3.1616 ms/op 0.93
MutableVector 250000 iterate all - toArray() + loop 3.0981 ms/op 3.8643 ms/op 0.80
MutableVector 250000 iterate all - get(i) 1.5450 ms/op 1.5353 ms/op 1.01
Array 250000 create 2.5962 ms/op 3.3243 ms/op 0.78
Array 250000 clone - spread 1.1914 ms/op 1.2658 ms/op 0.94
Array 250000 get(125000) 0.62100 ns/op 0.59500 ns/op 1.04
Array 250000 set(125000) 0.72000 ns/op 0.68600 ns/op 1.05
Array 250000 iterate all - loop 86.627 us/op 85.167 us/op 1.02
effectiveBalanceIncrements clone Uint8Array 300000 32.362 us/op 32.201 us/op 1.00
effectiveBalanceIncrements clone MutableVector 300000 397.00 ns/op 361.00 ns/op 1.10
effectiveBalanceIncrements rw all Uint8Array 300000 169.64 us/op 171.00 us/op 0.99
effectiveBalanceIncrements rw all MutableVector 300000 88.745 ms/op 85.316 ms/op 1.04
phase0 afterProcessEpoch - 250000 vs - 7PWei 119.15 ms/op 116.86 ms/op 1.02
phase0 beforeProcessEpoch - 250000 vs - 7PWei 33.901 ms/op 45.513 ms/op 0.74
altair processEpoch - mainnet_e81889 349.64 ms/op 319.76 ms/op 1.09
mainnet_e81889 - altair beforeProcessEpoch 73.126 ms/op 62.555 ms/op 1.17
mainnet_e81889 - altair processJustificationAndFinalization 18.082 us/op 20.968 us/op 0.86
mainnet_e81889 - altair processInactivityUpdates 6.1436 ms/op 5.8526 ms/op 1.05
mainnet_e81889 - altair processRewardsAndPenalties 53.639 ms/op 51.547 ms/op 1.04
mainnet_e81889 - altair processRegistryUpdates 2.9150 us/op 2.3610 us/op 1.23
mainnet_e81889 - altair processSlashings 644.00 ns/op 598.00 ns/op 1.08
mainnet_e81889 - altair processEth1DataReset 553.00 ns/op 559.00 ns/op 0.99
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2950 ms/op 1.2470 ms/op 1.04
mainnet_e81889 - altair processSlashingsReset 4.7910 us/op 5.4610 us/op 0.88
mainnet_e81889 - altair processRandaoMixesReset 9.6540 us/op 4.5990 us/op 2.10
mainnet_e81889 - altair processHistoricalRootsUpdate 795.00 ns/op 625.00 ns/op 1.27
mainnet_e81889 - altair processParticipationFlagUpdates 3.3780 us/op 2.5870 us/op 1.31
mainnet_e81889 - altair processSyncCommitteeUpdates 590.00 ns/op 609.00 ns/op 0.97
mainnet_e81889 - altair afterProcessEpoch 127.68 ms/op 120.81 ms/op 1.06
phase0 processEpoch - mainnet_e58758 357.44 ms/op 336.39 ms/op 1.06
mainnet_e58758 - phase0 beforeProcessEpoch 144.36 ms/op 129.66 ms/op 1.11
mainnet_e58758 - phase0 processJustificationAndFinalization 18.304 us/op 17.328 us/op 1.06
mainnet_e58758 - phase0 processRewardsAndPenalties 61.774 ms/op 53.731 ms/op 1.15
mainnet_e58758 - phase0 processRegistryUpdates 7.4230 us/op 7.5920 us/op 0.98
mainnet_e58758 - phase0 processSlashings 448.00 ns/op 498.00 ns/op 0.90
mainnet_e58758 - phase0 processEth1DataReset 452.00 ns/op 494.00 ns/op 0.91
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.0780 ms/op 1.0008 ms/op 1.08
mainnet_e58758 - phase0 processSlashingsReset 4.6490 us/op 2.9820 us/op 1.56
mainnet_e58758 - phase0 processRandaoMixesReset 6.8230 us/op 4.4530 us/op 1.53
mainnet_e58758 - phase0 processHistoricalRootsUpdate 663.00 ns/op 620.00 ns/op 1.07
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.7780 us/op 3.8240 us/op 0.99
mainnet_e58758 - phase0 afterProcessEpoch 96.546 ms/op 101.69 ms/op 0.95
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.2302 ms/op 1.2682 ms/op 0.97
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.5292 ms/op 1.4426 ms/op 1.06
altair processInactivityUpdates - 250000 normalcase 24.714 ms/op 21.656 ms/op 1.14
altair processInactivityUpdates - 250000 worstcase 25.163 ms/op 19.436 ms/op 1.29
phase0 processRegistryUpdates - 250000 normalcase 6.8580 us/op 6.5890 us/op 1.04
phase0 processRegistryUpdates - 250000 badcase_full_deposits 253.72 us/op 262.55 us/op 0.97
phase0 processRegistryUpdates - 250000 worstcase 0.5 125.50 ms/op 115.97 ms/op 1.08
altair processRewardsAndPenalties - 250000 normalcase 68.473 ms/op 56.932 ms/op 1.20
altair processRewardsAndPenalties - 250000 worstcase 67.272 ms/op 53.507 ms/op 1.26
phase0 getAttestationDeltas - 250000 normalcase 6.5939 ms/op 6.7250 ms/op 0.98
phase0 getAttestationDeltas - 250000 worstcase 6.5084 ms/op 6.8891 ms/op 0.94
phase0 processSlashings - 250000 worstcase 3.5975 ms/op 3.6356 ms/op 0.99
altair processSyncCommitteeUpdates - 250000 170.75 ms/op 181.54 ms/op 0.94
BeaconState.hashTreeRoot - No change 262.00 ns/op 272.00 ns/op 0.96
BeaconState.hashTreeRoot - 1 full validator 53.034 us/op 51.232 us/op 1.04
BeaconState.hashTreeRoot - 32 full validator 526.99 us/op 544.84 us/op 0.97
BeaconState.hashTreeRoot - 512 full validator 5.2290 ms/op 5.3359 ms/op 0.98
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 63.272 us/op 62.585 us/op 1.01
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 881.29 us/op 943.29 us/op 0.93
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 11.964 ms/op 11.863 ms/op 1.01
BeaconState.hashTreeRoot - 1 balances 48.916 us/op 49.734 us/op 0.98
BeaconState.hashTreeRoot - 32 balances 436.11 us/op 453.63 us/op 0.96
BeaconState.hashTreeRoot - 512 balances 4.5249 ms/op 4.4510 ms/op 1.02
BeaconState.hashTreeRoot - 250000 balances 77.696 ms/op 77.130 ms/op 1.01
aggregationBits - 2048 els - zipIndexesInBitList 15.874 us/op 16.588 us/op 0.96
regular array get 100000 times 32.889 us/op 33.022 us/op 1.00
wrappedArray get 100000 times 32.883 us/op 32.894 us/op 1.00
arrayWithProxy get 100000 times 15.543 ms/op 15.567 ms/op 1.00
ssz.Root.equals 590.00 ns/op 564.00 ns/op 1.05
byteArrayEquals 580.00 ns/op 561.00 ns/op 1.03
shuffle list - 16384 els 6.7676 ms/op 6.8689 ms/op 0.99
shuffle list - 250000 els 99.559 ms/op 100.63 ms/op 0.99
processSlot - 1 slots 9.0440 us/op 8.9680 us/op 1.01
processSlot - 32 slots 1.3092 ms/op 1.4170 ms/op 0.92
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 34.541 ms/op 33.059 ms/op 1.04
getCommitteeAssignments - req 1 vs - 250000 vc 2.9133 ms/op 2.9782 ms/op 0.98
getCommitteeAssignments - req 100 vs - 250000 vc 4.0593 ms/op 4.1790 ms/op 0.97
getCommitteeAssignments - req 1000 vs - 250000 vc 4.4288 ms/op 4.5861 ms/op 0.97
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.6400 ns/op 4.9300 ns/op 0.94
state getBlockRootAtSlot - 250000 vs - 7PWei 745.66 ns/op 657.23 ns/op 1.13
computeProposers - vc 250000 10.172 ms/op 10.605 ms/op 0.96
computeEpochShuffling - vc 250000 101.13 ms/op 104.76 ms/op 0.97
getNextSyncCommittee - vc 250000 165.94 ms/op 179.17 ms/op 0.93
computeSigningRoot for AttestationData 12.646 us/op 14.394 us/op 0.88
hash AttestationData serialized data then Buffer.toString(base64) 2.4448 us/op 2.4978 us/op 0.98
toHexString serialized data 1.0637 us/op 1.2827 us/op 0.83
Buffer.toString(base64) 325.50 ns/op 367.08 ns/op 0.89

by benchmarkbot/action

@wemeetagain wemeetagain merged commit e242743 into unstable May 24, 2023
@wemeetagain wemeetagain deleted the dapplion/lint-dashboards branch May 24, 2023 09:15
@wemeetagain
Copy link
Member

🎉 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.

2 participants