Skip to content

Commit

Permalink
Update src/stateAggregator/accessors/aliasAccessor.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Shane McLaughlin <[email protected]>
  • Loading branch information
cristiand391 and mshanemc authored Oct 25, 2023
1 parent c59c7c7 commit ce1ebcb
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/stateAggregator/accessors/aliasAccessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,11 +281,8 @@ const fileContentsRawToAliasStore = (contents: string): Map<string, string> => {
[DEFAULT_GROUP]: { [alias: string]: string };
};

// old alias file may not have `orgs` prop
if (!fileContents[DEFAULT_GROUP]) {
fileContents[DEFAULT_GROUP] = {};
}
return new Map(Object.entries(fileContents[DEFAULT_GROUP]));
// handle when alias file exists but is missing the org property
return new Map(Object.entries(fileContents[DEFAULT_GROUP] ?? {}));
};

const aliasStoreToRawFileContents = (aliasStore: Map<string, string>): string =>
Expand Down

3 comments on commit ce1ebcb

@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: ce1ebcb Previous: 37ed65b Ratio
Child logger creation 456074 ops/sec (±8.86%) 471088 ops/sec (±9.50%) 1.03
Logging a string on root logger 486490 ops/sec (±11.82%) 656084 ops/sec (±11.23%) 1.35
Logging an object on root logger 396049 ops/sec (±14.14%) 466774 ops/sec (±13.90%) 1.18
Logging an object with a message on root logger 234578 ops/sec (±14.80%) 16215 ops/sec (±185.45%) 0.06912412928748647
Logging an object with a redacted prop on root logger 281092 ops/sec (±17.79%) 377428 ops/sec (±11.87%) 1.34
Logging a nested 3-level object on root logger 1527 ops/sec (±243.28%) 286421 ops/sec (±10.30%) 187.57

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: ce1ebcb Previous: 37ed65b Ratio
Logging a nested 3-level object on root logger 1527 ops/sec (±243.28%) 286421 ops/sec (±10.30%) 187.57

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: ce1ebcb Previous: 37ed65b Ratio
Child logger creation 406802 ops/sec (±1.02%) 445777 ops/sec (±1.01%) 1.10
Logging a string on root logger 436839 ops/sec (±11.55%) 502223 ops/sec (±19.13%) 1.15
Logging an object on root logger 283586 ops/sec (±24.21%) 356911 ops/sec (±13.93%) 1.26
Logging an object with a message on root logger 160443 ops/sec (±25.39%) 244742 ops/sec (±15.10%) 1.53
Logging an object with a redacted prop on root logger 144715 ops/sec (±25.27%) 260679 ops/sec (±20.97%) 1.80
Logging a nested 3-level object on root logger 112494 ops/sec (±22.40%) 3111 ops/sec (±204.95%) 0.027654808256440344

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

Please sign in to comment.