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!: update prometheus-gc-stats dependency #5677

Merged
merged 2 commits into from
Jun 22, 2023

Conversation

wemeetagain
Copy link
Member

@wemeetagain wemeetagain commented Jun 21, 2023

Motivation

When updating to node v20, the gc-stats package was found to be out of date and incompatible with node 20. This dependency is a sub-dependency of prometheus-gc-stats, which we use to gather information about gc runs.

While investigating, I found that the information from gc-stats is now available natively from the node:v8 package (as of node v18.15.0).

Seeing as prometheus-gc-stats was not well maintained, and gc-stats is completely abandoned, I took this opportunity to simplify the supply chain and use the native functionality from node:v8 in a new @chainsafe/prometheus-gc-stats package (pull requests and a review welcome).

Description

  • Use @chainsafe/prometheus-gc-stats instead of prometheus-gc-stats.
  • Calling gcStats(...) now requires cleanup by calling the returned function.
  • Always use the latest lts in our workflows
  • Explicitly state the minimum node version (v18.15.x) in the README

@wemeetagain wemeetagain requested a review from a team as a code owner June 21, 2023 15:48
@wemeetagain wemeetagain force-pushed the cayman/update-prometheus-gc-stats branch from d9ea0d6 to 94fe4c4 Compare June 21, 2023 16:37
@github-actions
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 3c27aee Previous: 2a2c517 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 772.38 us/op 1.0573 ms/op 0.73
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 47.865 us/op 63.228 us/op 0.76
BLS verify - blst-native 1.2458 ms/op 1.2680 ms/op 0.98
BLS verifyMultipleSignatures 3 - blst-native 2.5298 ms/op 2.5340 ms/op 1.00
BLS verifyMultipleSignatures 8 - blst-native 5.4448 ms/op 5.4762 ms/op 0.99
BLS verifyMultipleSignatures 32 - blst-native 19.705 ms/op 19.849 ms/op 0.99
BLS aggregatePubkeys 32 - blst-native 26.625 us/op 26.334 us/op 1.01
BLS aggregatePubkeys 128 - blst-native 102.64 us/op 102.48 us/op 1.00
getAttestationsForBlock 59.449 ms/op 71.644 ms/op 0.83
isKnown best case - 1 super set check 283.00 ns/op 270.00 ns/op 1.05
isKnown normal case - 2 super set checks 269.00 ns/op 265.00 ns/op 1.02
isKnown worse case - 16 super set checks 270.00 ns/op 262.00 ns/op 1.03
CheckpointStateCache - add get delete 4.9820 us/op 6.1980 us/op 0.80
validate gossip signedAggregateAndProof - struct 2.8248 ms/op 2.8184 ms/op 1.00
validate gossip attestation - struct 1.3489 ms/op 1.3429 ms/op 1.00
pickEth1Vote - no votes 1.2583 ms/op 1.3821 ms/op 0.91
pickEth1Vote - max votes 8.7677 ms/op 12.649 ms/op 0.69
pickEth1Vote - Eth1Data hashTreeRoot value x2048 8.5938 ms/op 10.178 ms/op 0.84
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 18.684 ms/op 16.838 ms/op 1.11
pickEth1Vote - Eth1Data fastSerialize value x2048 674.16 us/op 776.36 us/op 0.87
pickEth1Vote - Eth1Data fastSerialize tree x2048 4.8897 ms/op 8.0056 ms/op 0.61
bytes32 toHexString 524.00 ns/op 802.00 ns/op 0.65
bytes32 Buffer.toString(hex) 362.00 ns/op 443.00 ns/op 0.82
bytes32 Buffer.toString(hex) from Uint8Array 573.00 ns/op 643.00 ns/op 0.89
bytes32 Buffer.toString(hex) + 0x 367.00 ns/op 489.00 ns/op 0.75
Object access 1 prop 0.19000 ns/op 0.21200 ns/op 0.90
Map access 1 prop 0.16900 ns/op 0.17900 ns/op 0.94
Object get x1000 7.2220 ns/op 7.6010 ns/op 0.95
Map get x1000 0.59900 ns/op 0.60900 ns/op 0.98
Object set x1000 56.501 ns/op 81.250 ns/op 0.70
Map set x1000 45.155 ns/op 57.484 ns/op 0.79
Return object 10000 times 0.24280 ns/op 0.28070 ns/op 0.86
Throw Error 10000 times 4.3543 us/op 4.3904 us/op 0.99
fastMsgIdFn sha256 / 200 bytes 3.5900 us/op 3.6050 us/op 1.00
fastMsgIdFn h32 xxhash / 200 bytes 295.00 ns/op 330.00 ns/op 0.89
fastMsgIdFn h64 xxhash / 200 bytes 423.00 ns/op 491.00 ns/op 0.86
fastMsgIdFn sha256 / 1000 bytes 12.024 us/op 11.995 us/op 1.00
fastMsgIdFn h32 xxhash / 1000 bytes 430.00 ns/op 458.00 ns/op 0.94
fastMsgIdFn h64 xxhash / 1000 bytes 501.00 ns/op 600.00 ns/op 0.83
fastMsgIdFn sha256 / 10000 bytes 107.03 us/op 105.44 us/op 1.02
fastMsgIdFn h32 xxhash / 10000 bytes 1.9880 us/op 2.0430 us/op 0.97
fastMsgIdFn h64 xxhash / 10000 bytes 1.4440 us/op 1.4980 us/op 0.96
enrSubnets - fastDeserialize 64 bits 1.3660 us/op 2.0720 us/op 0.66
enrSubnets - ssz BitVector 64 bits 514.00 ns/op 743.00 ns/op 0.69
enrSubnets - fastDeserialize 4 bits 181.00 ns/op 228.00 ns/op 0.79
enrSubnets - ssz BitVector 4 bits 519.00 ns/op 657.00 ns/op 0.79
prioritizePeers score -10:0 att 32-0.1 sync 2-0 120.43 us/op 124.73 us/op 0.97
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 136.99 us/op 184.83 us/op 0.74
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 171.24 us/op 221.51 us/op 0.77
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 307.93 us/op 403.26 us/op 0.76
prioritizePeers score 0:0 att 64-1 sync 4-1 374.95 us/op 465.50 us/op 0.81
array of 16000 items push then shift 1.6901 us/op 1.8949 us/op 0.89
LinkedList of 16000 items push then shift 9.0580 ns/op 9.6370 ns/op 0.94
array of 16000 items push then pop 86.795 ns/op 130.81 ns/op 0.66
LinkedList of 16000 items push then pop 8.9090 ns/op 10.144 ns/op 0.88
array of 24000 items push then shift 2.4528 us/op 2.5897 us/op 0.95
LinkedList of 24000 items push then shift 10.967 ns/op 10.647 ns/op 1.03
array of 24000 items push then pop 85.837 ns/op 104.77 ns/op 0.82
LinkedList of 24000 items push then pop 10.445 ns/op 10.317 ns/op 1.01
intersect bitArray bitLen 8 14.465 ns/op 14.638 ns/op 0.99
intersect array and set length 8 84.753 ns/op 103.10 ns/op 0.82
intersect bitArray bitLen 128 45.612 ns/op 52.268 ns/op 0.87
intersect array and set length 128 1.0637 us/op 1.4960 us/op 0.71
Buffer.concat 32 items 2.9920 us/op 3.6580 us/op 0.82
Uint8Array.set 32 items 3.1500 us/op 2.5670 us/op 1.23
transfer serialized Status (84 B) 2.1160 us/op 2.3640 us/op 0.90
copy serialized Status (84 B) 1.6250 us/op 2.0450 us/op 0.79
transfer serialized SignedVoluntaryExit (112 B) 2.0760 us/op 2.5000 us/op 0.83
copy serialized SignedVoluntaryExit (112 B) 1.7150 us/op 1.8940 us/op 0.91
transfer serialized ProposerSlashing (416 B) 2.4110 us/op 2.6830 us/op 0.90
copy serialized ProposerSlashing (416 B) 2.1050 us/op 2.6080 us/op 0.81
transfer serialized Attestation (485 B) 2.3410 us/op 2.7950 us/op 0.84
copy serialized Attestation (485 B) 2.1680 us/op 2.6360 us/op 0.82
transfer serialized AttesterSlashing (33232 B) 2.3800 us/op 2.9800 us/op 0.80
copy serialized AttesterSlashing (33232 B) 5.6220 us/op 10.444 us/op 0.54
transfer serialized Small SignedBeaconBlock (128000 B) 2.5760 us/op 3.3890 us/op 0.76
copy serialized Small SignedBeaconBlock (128000 B) 17.763 us/op 32.326 us/op 0.55
transfer serialized Avg SignedBeaconBlock (200000 B) 3.1170 us/op 4.0690 us/op 0.77
copy serialized Avg SignedBeaconBlock (200000 B) 23.801 us/op 86.397 us/op 0.28
transfer serialized BlobsSidecar (524380 B) 3.1310 us/op 4.7010 us/op 0.67
copy serialized BlobsSidecar (524380 B) 124.88 us/op 236.59 us/op 0.53
transfer serialized Big SignedBeaconBlock (1000000 B) 3.4640 us/op 4.2120 us/op 0.82
copy serialized Big SignedBeaconBlock (1000000 B) 356.44 us/op 327.45 us/op 1.09
pass gossip attestations to forkchoice per slot 2.8676 ms/op 2.6827 ms/op 1.07
forkChoice updateHead vc 100000 bc 64 eq 0 2.2946 ms/op 2.1497 ms/op 1.07
forkChoice updateHead vc 600000 bc 64 eq 0 14.318 ms/op 11.734 ms/op 1.22
forkChoice updateHead vc 1000000 bc 64 eq 0 19.443 ms/op 22.486 ms/op 0.86
forkChoice updateHead vc 600000 bc 320 eq 0 17.243 ms/op 17.055 ms/op 1.01
forkChoice updateHead vc 600000 bc 1200 eq 0 87.961 ms/op 83.168 ms/op 1.06
forkChoice updateHead vc 600000 bc 64 eq 1000 21.861 ms/op 21.092 ms/op 1.04
forkChoice updateHead vc 600000 bc 64 eq 10000 23.349 ms/op 23.517 ms/op 0.99
forkChoice updateHead vc 600000 bc 64 eq 300000 32.827 ms/op 32.698 ms/op 1.00
computeDeltas 3.8080 ms/op 3.2170 ms/op 1.18
computeProposerBoostScoreFromBalances 1.9113 ms/op 1.7934 ms/op 1.07
altair processAttestation - 250000 vs - 7PWei normalcase 2.9281 ms/op 3.0403 ms/op 0.96
altair processAttestation - 250000 vs - 7PWei worstcase 3.7547 ms/op 4.4730 ms/op 0.84
altair processAttestation - setStatus - 1/6 committees join 148.95 us/op 142.59 us/op 1.04
altair processAttestation - setStatus - 1/3 committees join 294.14 us/op 281.00 us/op 1.05
altair processAttestation - setStatus - 1/2 committees join 408.68 us/op 385.99 us/op 1.06
altair processAttestation - setStatus - 2/3 committees join 504.88 us/op 469.00 us/op 1.08
altair processAttestation - setStatus - 4/5 committees join 690.17 us/op 662.72 us/op 1.04
altair processAttestation - setStatus - 100% committees join 798.95 us/op 769.55 us/op 1.04
altair processBlock - 250000 vs - 7PWei normalcase 19.900 ms/op 18.107 ms/op 1.10
altair processBlock - 250000 vs - 7PWei normalcase hashState 28.473 ms/op 28.250 ms/op 1.01
altair processBlock - 250000 vs - 7PWei worstcase 56.204 ms/op 49.226 ms/op 1.14
altair processBlock - 250000 vs - 7PWei worstcase hashState 75.063 ms/op 71.719 ms/op 1.05
phase0 processBlock - 250000 vs - 7PWei normalcase 2.4741 ms/op 2.4357 ms/op 1.02
phase0 processBlock - 250000 vs - 7PWei worstcase 31.387 ms/op 30.738 ms/op 1.02
altair processEth1Data - 250000 vs - 7PWei normalcase 657.44 us/op 611.28 us/op 1.08
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 9.6770 us/op 8.2260 us/op 1.18
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 26.757 us/op 28.039 us/op 0.95
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 10.040 us/op 10.171 us/op 0.99
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 9.4430 us/op 10.380 us/op 0.91
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 100.82 us/op 100.07 us/op 1.01
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 815.18 us/op 638.04 us/op 1.28
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.0898 ms/op 905.57 us/op 1.20
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.0734 ms/op 873.58 us/op 1.23
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.4393 ms/op 2.9572 ms/op 0.82
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.0677 ms/op 1.5264 ms/op 1.35
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.1626 ms/op 4.4461 ms/op 0.94
Tree 40 250000 create 338.05 ms/op 391.82 ms/op 0.86
Tree 40 250000 get(125000) 200.72 ns/op 195.24 ns/op 1.03
Tree 40 250000 set(125000) 1.0216 us/op 1.1456 us/op 0.89
Tree 40 250000 toArray() 20.145 ms/op 23.422 ms/op 0.86
Tree 40 250000 iterate all - toArray() + loop 19.079 ms/op 23.523 ms/op 0.81
Tree 40 250000 iterate all - get(i) 75.832 ms/op 75.763 ms/op 1.00
MutableVector 250000 create 13.656 ms/op 11.954 ms/op 1.14
MutableVector 250000 get(125000) 6.7500 ns/op 6.2880 ns/op 1.07
MutableVector 250000 set(125000) 276.22 ns/op 292.80 ns/op 0.94
MutableVector 250000 toArray() 3.0725 ms/op 4.1451 ms/op 0.74
MutableVector 250000 iterate all - toArray() + loop 3.3408 ms/op 3.8911 ms/op 0.86
MutableVector 250000 iterate all - get(i) 1.5942 ms/op 1.5098 ms/op 1.06
Array 250000 create 2.9158 ms/op 3.3882 ms/op 0.86
Array 250000 clone - spread 1.1457 ms/op 1.3429 ms/op 0.85
Array 250000 get(125000) 0.58100 ns/op 0.65400 ns/op 0.89
Array 250000 set(125000) 0.65300 ns/op 0.71900 ns/op 0.91
Array 250000 iterate all - loop 86.098 us/op 85.090 us/op 1.01
effectiveBalanceIncrements clone Uint8Array 300000 28.624 us/op 47.289 us/op 0.61
effectiveBalanceIncrements clone MutableVector 300000 359.00 ns/op 434.00 ns/op 0.83
effectiveBalanceIncrements rw all Uint8Array 300000 175.22 us/op 174.68 us/op 1.00
effectiveBalanceIncrements rw all MutableVector 300000 89.498 ms/op 144.27 ms/op 0.62
phase0 afterProcessEpoch - 250000 vs - 7PWei 121.96 ms/op 121.83 ms/op 1.00
phase0 beforeProcessEpoch - 250000 vs - 7PWei 47.861 ms/op 44.308 ms/op 1.08
altair processEpoch - mainnet_e81889 351.79 ms/op 367.67 ms/op 0.96
mainnet_e81889 - altair beforeProcessEpoch 67.815 ms/op 78.602 ms/op 0.86
mainnet_e81889 - altair processJustificationAndFinalization 25.063 us/op 20.406 us/op 1.23
mainnet_e81889 - altair processInactivityUpdates 5.5423 ms/op 7.3957 ms/op 0.75
mainnet_e81889 - altair processRewardsAndPenalties 70.530 ms/op 78.639 ms/op 0.90
mainnet_e81889 - altair processRegistryUpdates 3.2490 us/op 5.1660 us/op 0.63
mainnet_e81889 - altair processSlashings 579.00 ns/op 684.00 ns/op 0.85
mainnet_e81889 - altair processEth1DataReset 785.00 ns/op 1.2980 us/op 0.60
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.3849 ms/op 1.3814 ms/op 1.00
mainnet_e81889 - altair processSlashingsReset 7.0530 us/op 6.8330 us/op 1.03
mainnet_e81889 - altair processRandaoMixesReset 7.6300 us/op 6.8710 us/op 1.11
mainnet_e81889 - altair processHistoricalRootsUpdate 1.6230 us/op 1.6010 us/op 1.01
mainnet_e81889 - altair processParticipationFlagUpdates 3.3370 us/op 3.7190 us/op 0.90
mainnet_e81889 - altair processSyncCommitteeUpdates 630.00 ns/op 1.6900 us/op 0.37
mainnet_e81889 - altair afterProcessEpoch 151.09 ms/op 149.12 ms/op 1.01
phase0 processEpoch - mainnet_e58758 406.40 ms/op 559.54 ms/op 0.73
mainnet_e58758 - phase0 beforeProcessEpoch 158.41 ms/op 237.03 ms/op 0.67
mainnet_e58758 - phase0 processJustificationAndFinalization 21.198 us/op 36.679 us/op 0.58
mainnet_e58758 - phase0 processRewardsAndPenalties 72.475 ms/op 98.002 ms/op 0.74
mainnet_e58758 - phase0 processRegistryUpdates 10.719 us/op 14.844 us/op 0.72
mainnet_e58758 - phase0 processSlashings 628.00 ns/op 1.5220 us/op 0.41
mainnet_e58758 - phase0 processEth1DataReset 622.00 ns/op 1.4850 us/op 0.42
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.1181 ms/op 6.0826 ms/op 0.18
mainnet_e58758 - phase0 processSlashingsReset 5.2060 us/op 9.5590 us/op 0.54
mainnet_e58758 - phase0 processRandaoMixesReset 10.583 us/op 12.496 us/op 0.85
mainnet_e58758 - phase0 processHistoricalRootsUpdate 1.0880 us/op 1.7980 us/op 0.61
mainnet_e58758 - phase0 processParticipationRecordUpdates 5.2270 us/op 10.094 us/op 0.52
mainnet_e58758 - phase0 afterProcessEpoch 107.29 ms/op 115.56 ms/op 0.93
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.3611 ms/op 1.7590 ms/op 0.77
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.6213 ms/op 2.0279 ms/op 1.29
altair processInactivityUpdates - 250000 normalcase 25.101 ms/op 36.839 ms/op 0.68
altair processInactivityUpdates - 250000 worstcase 30.005 ms/op 33.512 ms/op 0.90
phase0 processRegistryUpdates - 250000 normalcase 8.9580 us/op 14.021 us/op 0.64
phase0 processRegistryUpdates - 250000 badcase_full_deposits 332.71 us/op 298.12 us/op 1.12
phase0 processRegistryUpdates - 250000 worstcase 0.5 143.03 ms/op 169.39 ms/op 0.84
altair processRewardsAndPenalties - 250000 normalcase 75.686 ms/op 75.608 ms/op 1.00
altair processRewardsAndPenalties - 250000 worstcase 80.046 ms/op 77.444 ms/op 1.03
phase0 getAttestationDeltas - 250000 normalcase 10.342 ms/op 7.6557 ms/op 1.35
phase0 getAttestationDeltas - 250000 worstcase 9.7132 ms/op 7.2905 ms/op 1.33
phase0 processSlashings - 250000 worstcase 3.9729 ms/op 3.4398 ms/op 1.15
altair processSyncCommitteeUpdates - 250000 214.70 ms/op 191.74 ms/op 1.12
BeaconState.hashTreeRoot - No change 408.00 ns/op 346.00 ns/op 1.18
BeaconState.hashTreeRoot - 1 full validator 58.438 us/op 51.880 us/op 1.13
BeaconState.hashTreeRoot - 32 full validator 652.97 us/op 563.68 us/op 1.16
BeaconState.hashTreeRoot - 512 full validator 7.4218 ms/op 6.3355 ms/op 1.17
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 71.521 us/op 64.715 us/op 1.11
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.0289 ms/op 980.47 us/op 1.05
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 13.927 ms/op 11.802 ms/op 1.18
BeaconState.hashTreeRoot - 1 balances 55.623 us/op 52.211 us/op 1.07
BeaconState.hashTreeRoot - 32 balances 524.60 us/op 513.92 us/op 1.02
BeaconState.hashTreeRoot - 512 balances 5.0020 ms/op 4.4074 ms/op 1.13
BeaconState.hashTreeRoot - 250000 balances 91.017 ms/op 74.527 ms/op 1.22
aggregationBits - 2048 els - zipIndexesInBitList 17.117 us/op 18.337 us/op 0.93
regular array get 100000 times 34.198 us/op 42.324 us/op 0.81
wrappedArray get 100000 times 34.069 us/op 33.287 us/op 1.02
arrayWithProxy get 100000 times 15.619 ms/op 16.984 ms/op 0.92
ssz.Root.equals 592.00 ns/op 591.00 ns/op 1.00
byteArrayEquals 592.00 ns/op 583.00 ns/op 1.02
shuffle list - 16384 els 7.6189 ms/op 7.0570 ms/op 1.08
shuffle list - 250000 els 108.01 ms/op 104.50 ms/op 1.03
processSlot - 1 slots 9.8670 us/op 9.5920 us/op 1.03
processSlot - 32 slots 1.3986 ms/op 1.3946 ms/op 1.00
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 43.953 ms/op 39.938 ms/op 1.10
getCommitteeAssignments - req 1 vs - 250000 vc 2.9592 ms/op 2.8852 ms/op 1.03
getCommitteeAssignments - req 100 vs - 250000 vc 4.2579 ms/op 4.1185 ms/op 1.03
getCommitteeAssignments - req 1000 vs - 250000 vc 4.5890 ms/op 4.5026 ms/op 1.02
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.7800 ns/op 5.0600 ns/op 0.94
state getBlockRootAtSlot - 250000 vs - 7PWei 588.77 ns/op 651.52 ns/op 0.90
computeProposers - vc 250000 10.990 ms/op 11.057 ms/op 0.99
computeEpochShuffling - vc 250000 106.89 ms/op 106.25 ms/op 1.01
getNextSyncCommittee - vc 250000 179.54 ms/op 192.16 ms/op 0.93
computeSigningRoot for AttestationData 12.959 us/op 14.682 us/op 0.88
hash AttestationData serialized data then Buffer.toString(base64) 2.5282 us/op 2.5657 us/op 0.99
toHexString serialized data 1.1035 us/op 1.2305 us/op 0.90
Buffer.toString(base64) 347.42 ns/op 352.04 ns/op 0.99

by benchmarkbot/action

@wemeetagain wemeetagain changed the title chore: update prometheus-gc-stats dependency chore!: update prometheus-gc-stats dependency Jun 21, 2023
@wemeetagain wemeetagain merged commit 7c101f0 into unstable Jun 22, 2023
@wemeetagain wemeetagain deleted the cayman/update-prometheus-gc-stats branch June 22, 2023 13:35
@@ -13,5 +13,7 @@ export function collectNodeJSMetrics(register: Registry, prefix?: string): void
// - nodejs_gc_runs_total: Counts the number of time GC is invoked
// - nodejs_gc_pause_seconds_total: Time spent in GC in seconds
// - nodejs_gc_reclaimed_bytes_total: The number of bytes GC has freed
gcStats(register, {prefix})();
// `close` must be called to stop the gc collection process from continuing
const close = gcStats(register, {collectionInterval: 6000, prefix});
Copy link
Member

Choose a reason for hiding this comment

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

why is the interval every 6 seconds? Is it just randomly selected or is there some reason for that specific value?

@wemeetagain
Copy link
Member Author

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

3 participants