Skip to content

Commit

Permalink
chore: allow undefined for internal cryptoVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
shetzel committed Feb 8, 2024
1 parent 6774418 commit 5876135
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/crypto/crypto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const getCryptoV2EnvVar = (): CryptoV2Value => {

type CryptoEncoding = 'utf8' | 'hex';
type CryptoVersion = keyof typeof IV_BYTES;
let cryptoVersion: CryptoVersion;
let cryptoVersion: CryptoVersion | undefined;
const getCryptoVersion = (): CryptoVersion => {
if (!cryptoVersion) {
// This only happens when generating a new key, so use the env var
Expand Down Expand Up @@ -207,7 +207,6 @@ export class Crypto extends AsyncOptionalCreatable<CryptoOptions> {
// @ts-expect-error only for test access
// eslint-disable-next-line class-methods-use-this
private static unsetCryptoVersion(): void {
// @ts-expect-error only for test access
cryptoVersion = undefined;
}

Expand Down

3 comments on commit 5876135

@svc-cli-bot
Copy link
Contributor

Choose a reason for hiding this comment

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

Logger Benchmarks - ubuntu-latest

Benchmark suite Current: 5876135 Previous: 6774418 Ratio
Child logger creation 470514 ops/sec (±2.47%) 459259 ops/sec (±0.75%) 0.98
Logging a string on root logger 835499 ops/sec (±8.47%) 701199 ops/sec (±7.26%) 0.84
Logging an object on root logger 587066 ops/sec (±7.57%) 561798 ops/sec (±6.86%) 0.96
Logging an object with a message on root logger 5185 ops/sec (±217.06%) 17755 ops/sec (±186.97%) 3.42
Logging an object with a redacted prop on root logger 396669 ops/sec (±11.51%) 380326 ops/sec (±14.30%) 0.96
Logging a nested 3-level object on root logger 372114 ops/sec (±8.06%) 354811 ops/sec (±9.30%) 0.95

This comment was automatically generated by workflow using github-action-benchmark.

@svc-cli-bot
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Logger Benchmarks - ubuntu-latest'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 5876135 Previous: 6774418 Ratio
Logging an object with a message on root logger 5185 ops/sec (±217.06%) 17755 ops/sec (±186.97%) 3.42

This comment was automatically generated by workflow using github-action-benchmark.

@svc-cli-bot
Copy link
Contributor

Choose a reason for hiding this comment

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

Logger Benchmarks - windows-latest

Benchmark suite Current: 5876135 Previous: 6774418 Ratio
Child logger creation 320111 ops/sec (±3.20%) 334908 ops/sec (±0.54%) 1.05
Logging a string on root logger 763969 ops/sec (±11.66%) 770131 ops/sec (±6.89%) 1.01
Logging an object on root logger 599885 ops/sec (±6.23%) 617597 ops/sec (±7.28%) 1.03
Logging an object with a message on root logger 6746 ops/sec (±204.43%) 9250 ops/sec (±199.72%) 1.37
Logging an object with a redacted prop on root logger 436318 ops/sec (±11.33%) 489021 ops/sec (±5.73%) 1.12
Logging a nested 3-level object on root logger 340477 ops/sec (±4.31%) 302112 ops/sec (±5.69%) 0.89

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.