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(logger): restore previous --logFileDailyRotate behavior #5598

Merged
merged 1 commit into from
Jun 1, 2023

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Jun 1, 2023

Motivation

#5490 (comment)

Description

Restores previous --logFileDailyRotate behavior

  • lodestar --logFileDailyRotate -> enable daily rotate with default value (same as omitting the flag)
  • lodestar --logFileDailyRotate 10 -> set daily rotate to custom value 10
  • lodestar --logFileDailyRotate 0 -> disable daily rotate and accumulate in same file

This logic was previously handled by the CLI package

// `lodestar --logFileDailyRotate` -> enabled daily rotate with default value
// `lodestar --logFileDailyRotate 10` -> set daily rotate to custom value 10
// `lodestar --logFileDailyRotate 0` -> disable daily rotate and accumulate in same file
const rotateMaxFiles = args.logFileDailyRotate ?? LOG_DAILY_ROTATE_DEFAULT;
const filename = args.logFile ?? paths.defaultLogFilepath;
if (args.logFile !== LOG_FILE_DISABLE_KEYWORD) {
const logFileLevel = args.logFileLevel ?? LOG_FILE_LEVEL_DEFAULT;
transports.push(
rotateMaxFiles > 0
? new DailyRotateFile({

@nflaig nflaig requested a review from a team as a code owner June 1, 2023 12:51
@nflaig nflaig force-pushed the nflaig/fix-file-daily-rotate branch from 6af93dd to 95996d2 Compare June 1, 2023 13:03
@github-actions
Copy link
Contributor

github-actions bot commented Jun 1, 2023

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 7f57392 Previous: e2e5417 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 787.29 us/op 852.99 us/op 0.92
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 58.027 us/op 43.675 us/op 1.33
BLS verify - blst-native 1.2706 ms/op 1.2199 ms/op 1.04
BLS verifyMultipleSignatures 3 - blst-native 2.5977 ms/op 2.4440 ms/op 1.06
BLS verifyMultipleSignatures 8 - blst-native 5.5884 ms/op 5.2677 ms/op 1.06
BLS verifyMultipleSignatures 32 - blst-native 20.184 ms/op 19.036 ms/op 1.06
BLS aggregatePubkeys 32 - blst-native 26.109 us/op 25.625 us/op 1.02
BLS aggregatePubkeys 128 - blst-native 100.82 us/op 100.37 us/op 1.00
getAttestationsForBlock 52.560 ms/op 55.099 ms/op 0.95
isKnown best case - 1 super set check 252.00 ns/op 260.00 ns/op 0.97
isKnown normal case - 2 super set checks 246.00 ns/op 288.00 ns/op 0.85
isKnown worse case - 16 super set checks 244.00 ns/op 250.00 ns/op 0.98
CheckpointStateCache - add get delete 4.9800 us/op 5.0810 us/op 0.98
validate gossip signedAggregateAndProof - struct 2.8454 ms/op 2.7725 ms/op 1.03
validate gossip attestation - struct 1.3734 ms/op 1.3397 ms/op 1.03
pickEth1Vote - no votes 1.2934 ms/op 1.3736 ms/op 0.94
pickEth1Vote - max votes 11.756 ms/op 11.733 ms/op 1.00
pickEth1Vote - Eth1Data hashTreeRoot value x2048 9.2098 ms/op 8.8090 ms/op 1.05
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 13.660 ms/op 15.050 ms/op 0.91
pickEth1Vote - Eth1Data fastSerialize value x2048 643.60 us/op 620.85 us/op 1.04
pickEth1Vote - Eth1Data fastSerialize tree x2048 4.7761 ms/op 7.8530 ms/op 0.61
bytes32 toHexString 502.00 ns/op 525.00 ns/op 0.96
bytes32 Buffer.toString(hex) 350.00 ns/op 369.00 ns/op 0.95
bytes32 Buffer.toString(hex) from Uint8Array 553.00 ns/op 550.00 ns/op 1.01
bytes32 Buffer.toString(hex) + 0x 377.00 ns/op 355.00 ns/op 1.06
Object access 1 prop 0.17300 ns/op 0.16300 ns/op 1.06
Map access 1 prop 0.15800 ns/op 0.15800 ns/op 1.00
Object get x1000 6.7550 ns/op 6.5900 ns/op 1.03
Map get x1000 0.63000 ns/op 0.56000 ns/op 1.13
Object set x1000 53.301 ns/op 53.647 ns/op 0.99
Map set x1000 47.737 ns/op 44.299 ns/op 1.08
Return object 10000 times 0.24240 ns/op 0.23520 ns/op 1.03
Throw Error 10000 times 4.2554 us/op 4.2426 us/op 1.00
fastMsgIdFn sha256 / 200 bytes 3.5690 us/op 3.4890 us/op 1.02
fastMsgIdFn h32 xxhash / 200 bytes 300.00 ns/op 284.00 ns/op 1.06
fastMsgIdFn h64 xxhash / 200 bytes 425.00 ns/op 399.00 ns/op 1.07
fastMsgIdFn sha256 / 1000 bytes 11.732 us/op 11.679 us/op 1.00
fastMsgIdFn h32 xxhash / 1000 bytes 417.00 ns/op 471.00 ns/op 0.89
fastMsgIdFn h64 xxhash / 1000 bytes 489.00 ns/op 583.00 ns/op 0.84
fastMsgIdFn sha256 / 10000 bytes 104.09 us/op 106.73 us/op 0.98
fastMsgIdFn h32 xxhash / 10000 bytes 1.9720 us/op 2.1500 us/op 0.92
fastMsgIdFn h64 xxhash / 10000 bytes 1.4460 us/op 1.6170 us/op 0.89
enrSubnets - fastDeserialize 64 bits 1.3750 us/op 1.8450 us/op 0.75
enrSubnets - ssz BitVector 64 bits 591.00 ns/op 644.00 ns/op 0.92
enrSubnets - fastDeserialize 4 bits 202.00 ns/op 214.00 ns/op 0.94
enrSubnets - ssz BitVector 4 bits 637.00 ns/op 670.00 ns/op 0.95
prioritizePeers score -10:0 att 32-0.1 sync 2-0 117.22 us/op 122.25 us/op 0.96
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 154.53 us/op 171.62 us/op 0.90
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 183.63 us/op 189.65 us/op 0.97
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 364.26 us/op 348.85 us/op 1.04
prioritizePeers score 0:0 att 64-1 sync 4-1 457.59 us/op 413.83 us/op 1.11
array of 16000 items push then shift 1.8068 us/op 1.7190 us/op 1.05
LinkedList of 16000 items push then shift 11.068 ns/op 9.3400 ns/op 1.19
array of 16000 items push then pop 117.00 ns/op 116.08 ns/op 1.01
LinkedList of 16000 items push then pop 9.1350 ns/op 8.4840 ns/op 1.08
array of 24000 items push then shift 2.4589 us/op 2.3589 us/op 1.04
LinkedList of 24000 items push then shift 9.3610 ns/op 8.6810 ns/op 1.08
array of 24000 items push then pop 87.824 ns/op 75.018 ns/op 1.17
LinkedList of 24000 items push then pop 9.6220 ns/op 8.5410 ns/op 1.13
intersect bitArray bitLen 8 14.082 ns/op 13.082 ns/op 1.08
intersect array and set length 8 113.20 ns/op 74.701 ns/op 1.52
intersect bitArray bitLen 128 45.688 ns/op 43.449 ns/op 1.05
intersect array and set length 128 1.3115 us/op 1.0304 us/op 1.27
Buffer.concat 32 items 3.1610 us/op 2.5820 us/op 1.22
Uint8Array.set 32 items 2.4640 us/op 2.6060 us/op 0.95
transfer serialized Status (84 B) 2.2940 us/op 2.1070 us/op 1.09
copy serialized Status (84 B) 1.8350 us/op 1.7310 us/op 1.06
transfer serialized SignedVoluntaryExit (112 B) 2.3210 us/op 2.1300 us/op 1.09
copy serialized SignedVoluntaryExit (112 B) 2.0080 us/op 1.6710 us/op 1.20
transfer serialized ProposerSlashing (416 B) 2.9230 us/op 2.1610 us/op 1.35
copy serialized ProposerSlashing (416 B) 3.3780 us/op 1.9440 us/op 1.74
transfer serialized Attestation (485 B) 3.0960 us/op 2.1520 us/op 1.44
copy serialized Attestation (485 B) 2.6930 us/op 2.2450 us/op 1.20
transfer serialized AttesterSlashing (33232 B) 2.7170 us/op 2.7190 us/op 1.00
copy serialized AttesterSlashing (33232 B) 8.1280 us/op 5.3820 us/op 1.51
transfer serialized Small SignedBeaconBlock (128000 B) 3.2800 us/op 2.6360 us/op 1.24
copy serialized Small SignedBeaconBlock (128000 B) 23.348 us/op 13.049 us/op 1.79
transfer serialized Avg SignedBeaconBlock (200000 B) 3.8560 us/op 3.1100 us/op 1.24
copy serialized Avg SignedBeaconBlock (200000 B) 54.763 us/op 18.369 us/op 2.98
transfer serialized BlobsSidecar (524380 B) 4.0100 us/op 2.9550 us/op 1.36
copy serialized BlobsSidecar (524380 B) 201.12 us/op 123.33 us/op 1.63
transfer serialized Big SignedBeaconBlock (1000000 B) 4.3160 us/op 3.0970 us/op 1.39
copy serialized Big SignedBeaconBlock (1000000 B) 185.43 us/op 262.58 us/op 0.71
pass gossip attestations to forkchoice per slot 2.7845 ms/op 2.6229 ms/op 1.06
forkChoice updateHead vc 100000 bc 64 eq 0 2.2290 ms/op 2.1349 ms/op 1.04
forkChoice updateHead vc 600000 bc 64 eq 0 12.295 ms/op 13.704 ms/op 0.90
forkChoice updateHead vc 1000000 bc 64 eq 0 24.416 ms/op 18.887 ms/op 1.29
forkChoice updateHead vc 600000 bc 320 eq 0 18.515 ms/op 16.397 ms/op 1.13
forkChoice updateHead vc 600000 bc 1200 eq 0 93.658 ms/op 80.825 ms/op 1.16
forkChoice updateHead vc 600000 bc 64 eq 1000 23.523 ms/op 20.365 ms/op 1.16
forkChoice updateHead vc 600000 bc 64 eq 10000 24.230 ms/op 21.833 ms/op 1.11
forkChoice updateHead vc 600000 bc 64 eq 300000 54.182 ms/op 30.515 ms/op 1.78
computeDeltas 3.4471 ms/op 3.4121 ms/op 1.01
computeProposerBoostScoreFromBalances 1.9021 ms/op 1.7871 ms/op 1.06
altair processAttestation - 250000 vs - 7PWei normalcase 3.0259 ms/op 2.2611 ms/op 1.34
altair processAttestation - 250000 vs - 7PWei worstcase 4.1047 ms/op 4.6181 ms/op 0.89
altair processAttestation - setStatus - 1/6 committees join 146.37 us/op 155.09 us/op 0.94
altair processAttestation - setStatus - 1/3 committees join 284.84 us/op 279.88 us/op 1.02
altair processAttestation - setStatus - 1/2 committees join 377.73 us/op 376.51 us/op 1.00
altair processAttestation - setStatus - 2/3 committees join 487.87 us/op 481.26 us/op 1.01
altair processAttestation - setStatus - 4/5 committees join 694.66 us/op 664.16 us/op 1.05
altair processAttestation - setStatus - 100% committees join 810.50 us/op 758.44 us/op 1.07
altair processBlock - 250000 vs - 7PWei normalcase 19.315 ms/op 19.099 ms/op 1.01
altair processBlock - 250000 vs - 7PWei normalcase hashState 30.992 ms/op 27.076 ms/op 1.14
altair processBlock - 250000 vs - 7PWei worstcase 54.989 ms/op 52.320 ms/op 1.05
altair processBlock - 250000 vs - 7PWei worstcase hashState 80.321 ms/op 77.297 ms/op 1.04
phase0 processBlock - 250000 vs - 7PWei normalcase 2.3713 ms/op 2.3637 ms/op 1.00
phase0 processBlock - 250000 vs - 7PWei worstcase 30.474 ms/op 30.358 ms/op 1.00
altair processEth1Data - 250000 vs - 7PWei normalcase 514.16 us/op 545.55 us/op 0.94
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 13.430 us/op 13.466 us/op 1.00
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 30.729 us/op 37.773 us/op 0.81
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 11.673 us/op 17.348 us/op 0.67
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 11.965 us/op 13.052 us/op 0.92
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 119.29 us/op 114.92 us/op 1.04
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 784.19 us/op 785.60 us/op 1.00
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 928.96 us/op 1.2929 ms/op 0.72
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 914.92 us/op 1.3647 ms/op 0.67
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.6229 ms/op 4.0953 ms/op 0.64
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.6320 ms/op 2.1739 ms/op 0.75
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.9729 ms/op 7.5507 ms/op 0.53
Tree 40 250000 create 346.35 ms/op 857.44 ms/op 0.40
Tree 40 250000 get(125000) 189.85 ns/op 205.70 ns/op 0.92
Tree 40 250000 set(125000) 1.1064 us/op 2.2813 us/op 0.48
Tree 40 250000 toArray() 21.243 ms/op 38.430 ms/op 0.55
Tree 40 250000 iterate all - toArray() + loop 18.445 ms/op 33.439 ms/op 0.55
Tree 40 250000 iterate all - get(i) 72.294 ms/op 92.671 ms/op 0.78
MutableVector 250000 create 10.713 ms/op 17.127 ms/op 0.63
MutableVector 250000 get(125000) 6.4410 ns/op 7.4610 ns/op 0.86
MutableVector 250000 set(125000) 247.70 ns/op 660.54 ns/op 0.37
MutableVector 250000 toArray() 2.6814 ms/op 5.6466 ms/op 0.47
MutableVector 250000 iterate all - toArray() + loop 2.8683 ms/op 5.6047 ms/op 0.51
MutableVector 250000 iterate all - get(i) 1.5425 ms/op 1.7579 ms/op 0.88
Array 250000 create 2.5465 ms/op 5.3717 ms/op 0.47
Array 250000 clone - spread 1.1129 ms/op 4.6801 ms/op 0.24
Array 250000 get(125000) 0.55200 ns/op 1.9790 ns/op 0.28
Array 250000 set(125000) 0.62800 ns/op 2.2310 ns/op 0.28
Array 250000 iterate all - loop 83.187 us/op 129.06 us/op 0.64
effectiveBalanceIncrements clone Uint8Array 300000 27.779 us/op 83.099 us/op 0.33
effectiveBalanceIncrements clone MutableVector 300000 339.00 ns/op 1.7820 us/op 0.19
effectiveBalanceIncrements rw all Uint8Array 300000 166.06 us/op 224.18 us/op 0.74
effectiveBalanceIncrements rw all MutableVector 300000 81.915 ms/op 264.67 ms/op 0.31
phase0 afterProcessEpoch - 250000 vs - 7PWei 115.35 ms/op 150.00 ms/op 0.77
phase0 beforeProcessEpoch - 250000 vs - 7PWei 42.038 ms/op 83.755 ms/op 0.50
altair processEpoch - mainnet_e81889 334.59 ms/op 475.00 ms/op 0.70
mainnet_e81889 - altair beforeProcessEpoch 71.536 ms/op 143.34 ms/op 0.50
mainnet_e81889 - altair processJustificationAndFinalization 24.357 us/op 42.871 us/op 0.57
mainnet_e81889 - altair processInactivityUpdates 6.3479 ms/op 8.9825 ms/op 0.71
mainnet_e81889 - altair processRewardsAndPenalties 72.440 ms/op 92.408 ms/op 0.78
mainnet_e81889 - altair processRegistryUpdates 2.9650 us/op 6.6710 us/op 0.44
mainnet_e81889 - altair processSlashings 504.00 ns/op 1.6760 us/op 0.30
mainnet_e81889 - altair processEth1DataReset 1.0460 us/op 1.0920 us/op 0.96
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.3341 ms/op 2.0431 ms/op 0.65
mainnet_e81889 - altair processSlashingsReset 4.3290 us/op 7.1030 us/op 0.61
mainnet_e81889 - altair processRandaoMixesReset 10.162 us/op 6.9100 us/op 1.47
mainnet_e81889 - altair processHistoricalRootsUpdate 677.00 ns/op 851.00 ns/op 0.80
mainnet_e81889 - altair processParticipationFlagUpdates 3.8510 us/op 2.7310 us/op 1.41
mainnet_e81889 - altair processSyncCommitteeUpdates 1.0760 us/op 1.1030 us/op 0.98
mainnet_e81889 - altair afterProcessEpoch 132.46 ms/op 131.61 ms/op 1.01
phase0 processEpoch - mainnet_e58758 380.61 ms/op 373.05 ms/op 1.02
mainnet_e58758 - phase0 beforeProcessEpoch 139.07 ms/op 138.24 ms/op 1.01
mainnet_e58758 - phase0 processJustificationAndFinalization 18.141 us/op 29.633 us/op 0.61
mainnet_e58758 - phase0 processRewardsAndPenalties 67.290 ms/op 62.316 ms/op 1.08
mainnet_e58758 - phase0 processRegistryUpdates 15.410 us/op 13.516 us/op 1.14
mainnet_e58758 - phase0 processSlashings 761.00 ns/op 1.2680 us/op 0.60
mainnet_e58758 - phase0 processEth1DataReset 952.00 ns/op 1.1480 us/op 0.83
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.8826 ms/op 1.0679 ms/op 1.76
mainnet_e58758 - phase0 processSlashingsReset 5.3700 us/op 8.9530 us/op 0.60
mainnet_e58758 - phase0 processRandaoMixesReset 5.3420 us/op 7.6350 us/op 0.70
mainnet_e58758 - phase0 processHistoricalRootsUpdate 667.00 ns/op 1.3600 us/op 0.49
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.5310 us/op 4.1420 us/op 1.09
mainnet_e58758 - phase0 afterProcessEpoch 100.21 ms/op 94.992 ms/op 1.05
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.2788 ms/op 1.2531 ms/op 1.02
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.5209 ms/op 1.5420 ms/op 0.99
altair processInactivityUpdates - 250000 normalcase 24.559 ms/op 25.326 ms/op 0.97
altair processInactivityUpdates - 250000 worstcase 24.623 ms/op 27.282 ms/op 0.90
phase0 processRegistryUpdates - 250000 normalcase 7.1830 us/op 6.4670 us/op 1.11
phase0 processRegistryUpdates - 250000 badcase_full_deposits 278.81 us/op 264.90 us/op 1.05
phase0 processRegistryUpdates - 250000 worstcase 0.5 127.30 ms/op 115.35 ms/op 1.10
altair processRewardsAndPenalties - 250000 normalcase 65.038 ms/op 68.351 ms/op 0.95
altair processRewardsAndPenalties - 250000 worstcase 70.094 ms/op 68.364 ms/op 1.03
phase0 getAttestationDeltas - 250000 normalcase 6.6884 ms/op 7.5528 ms/op 0.89
phase0 getAttestationDeltas - 250000 worstcase 7.1534 ms/op 6.8690 ms/op 1.04
phase0 processSlashings - 250000 worstcase 3.3916 ms/op 3.4782 ms/op 0.98
altair processSyncCommitteeUpdates - 250000 181.17 ms/op 179.53 ms/op 1.01
BeaconState.hashTreeRoot - No change 319.00 ns/op 357.00 ns/op 0.89
BeaconState.hashTreeRoot - 1 full validator 51.381 us/op 52.648 us/op 0.98
BeaconState.hashTreeRoot - 32 full validator 533.50 us/op 500.38 us/op 1.07
BeaconState.hashTreeRoot - 512 full validator 5.4907 ms/op 5.4991 ms/op 1.00
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 62.689 us/op 61.080 us/op 1.03
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 917.65 us/op 953.96 us/op 0.96
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 13.287 ms/op 10.968 ms/op 1.21
BeaconState.hashTreeRoot - 1 balances 50.515 us/op 48.663 us/op 1.04
BeaconState.hashTreeRoot - 32 balances 504.52 us/op 478.71 us/op 1.05
BeaconState.hashTreeRoot - 512 balances 4.8340 ms/op 4.3530 ms/op 1.11
BeaconState.hashTreeRoot - 250000 balances 78.969 ms/op 74.107 ms/op 1.07
aggregationBits - 2048 els - zipIndexesInBitList 18.668 us/op 15.404 us/op 1.21
regular array get 100000 times 36.141 us/op 39.662 us/op 0.91
wrappedArray get 100000 times 34.910 us/op 32.302 us/op 1.08
arrayWithProxy get 100000 times 16.623 ms/op 15.801 ms/op 1.05
ssz.Root.equals 558.00 ns/op 546.00 ns/op 1.02
byteArrayEquals 552.00 ns/op 531.00 ns/op 1.04
shuffle list - 16384 els 6.9998 ms/op 6.8646 ms/op 1.02
shuffle list - 250000 els 102.82 ms/op 100.55 ms/op 1.02
processSlot - 1 slots 9.9660 us/op 8.6430 us/op 1.15
processSlot - 32 slots 1.4080 ms/op 1.3397 ms/op 1.05
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 37.175 ms/op 36.387 ms/op 1.02
getCommitteeAssignments - req 1 vs - 250000 vc 3.0474 ms/op 2.8699 ms/op 1.06
getCommitteeAssignments - req 100 vs - 250000 vc 4.1768 ms/op 4.0738 ms/op 1.03
getCommitteeAssignments - req 1000 vs - 250000 vc 4.4416 ms/op 4.5197 ms/op 0.98
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.8800 ns/op 4.9600 ns/op 0.98
state getBlockRootAtSlot - 250000 vs - 7PWei 1.0160 us/op 661.54 ns/op 1.54
computeProposers - vc 250000 10.635 ms/op 10.566 ms/op 1.01
computeEpochShuffling - vc 250000 102.18 ms/op 104.02 ms/op 0.98
getNextSyncCommittee - vc 250000 171.33 ms/op 171.75 ms/op 1.00
computeSigningRoot for AttestationData 13.404 us/op 13.089 us/op 1.02
hash AttestationData serialized data then Buffer.toString(base64) 2.5712 us/op 2.4733 us/op 1.04
toHexString serialized data 1.1243 us/op 1.0673 us/op 1.05
Buffer.toString(base64) 352.60 ns/op 313.82 ns/op 1.12

by benchmarkbot/action

@nflaig nflaig force-pushed the nflaig/fix-file-daily-rotate branch from 95996d2 to e5d0858 Compare June 1, 2023 13:26
@@ -127,7 +127,7 @@ describe("winston transport log to file", () => {
const filenameRx = /^child-logger-test/;
const filepath = path.join(tmpDir, filename);

const logger = getNodeLoggerTest({module: "a", file: {filepath, level: LogLevel.info}});
const logger = getNodeLoggerTest({module: "a", file: {filepath, level: LogLevel.info, dailyRotate: 5}});
Copy link
Member Author

Choose a reason for hiding this comment

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

IMO better to set dailyRotate here to use DailyRotateFile which is the more commonly used file transport

- `lodestar --logFileDailyRotate` -> enable daily rotate with default value
- `lodestar --logFileDailyRotate 10` -> set daily rotate to custom value 10
- `lodestar --logFileDailyRotate 0` -> disable daily rotate and accumulate in same file
@nflaig nflaig force-pushed the nflaig/fix-file-daily-rotate branch from e5d0858 to 255c666 Compare June 1, 2023 13:31
@wemeetagain wemeetagain merged commit 51002d3 into unstable Jun 1, 2023
@wemeetagain wemeetagain deleted the nflaig/fix-file-daily-rotate branch June 1, 2023 14:14
@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