Skip to content

Commit

Permalink
chore: eslint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shetzel committed Apr 30, 2024
1 parent e79f343 commit 01cf9e7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/config/configFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ export class ConfigFile<
public async write(): Promise<P> {
const lockResponse = await lockInit(this.getPath());
if (this.getPath().endsWith('sandbox-create-cache.json')) {
// eslint-disable-next-line no-console
console.log('(async) time before write:', performance.now());
}

Expand All @@ -250,9 +251,11 @@ export class ConfigFile<
// write the merged LWWMap to file
await lockResponse.writeAndUnlock(JSON.stringify(this.getContents(), null, 2));
if (this.getPath().endsWith('sandbox-create-cache.json')) {
/* eslint-disable no-console */
console.log('(async) time after write:', performance.now());
console.dir(this.getContents(), { depth: 8 });
console.log('--------------------------------------');
/* eslint-enable no-console */
}

return this.getContents();
Expand All @@ -267,6 +270,7 @@ export class ConfigFile<
public writeSync(): P {
const lockResponse = lockInitSync(this.getPath());
if (this.getPath().endsWith('sandbox-create-cache.json')) {
// eslint-disable-next-line no-console
console.log('(sync) time before write:', performance.now());
}
try {
Expand All @@ -282,9 +286,11 @@ export class ConfigFile<
// write the merged LWWMap to file
lockResponse.writeAndUnlock(JSON.stringify(this.getContents(), null, 2));
if (this.getPath().endsWith('sandbox-create-cache.json')) {
/* eslint-disable no-console */
console.log('(sync) time after write:', performance.now());
console.dir(this.getContents(), { depth: 8 });
console.log('--------------------------------------');
/* eslint-enable no-console */
}

return this.getContents();
Expand Down

2 comments on commit 01cf9e7

@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: 01cf9e7 Previous: fb71b45 Ratio
Child logger creation 469123 ops/sec (±1.40%) 477583 ops/sec (±0.57%) 1.02
Logging a string on root logger 800500 ops/sec (±12.96%) 785501 ops/sec (±8.96%) 0.98
Logging an object on root logger 580714 ops/sec (±8.11%) 620688 ops/sec (±5.62%) 1.07
Logging an object with a message on root logger 8712 ops/sec (±205.13%) 6827 ops/sec (±212.85%) 0.78
Logging an object with a redacted prop on root logger 455852 ops/sec (±8.42%) 465103 ops/sec (±5.73%) 1.02
Logging a nested 3-level object on root logger 361439 ops/sec (±7.33%) 397394 ops/sec (±6.94%) 1.10

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: 01cf9e7 Previous: fb71b45 Ratio
Child logger creation 308613 ops/sec (±2.03%) 342843 ops/sec (±0.50%) 1.11
Logging a string on root logger 800307 ops/sec (±6.96%) 837027 ops/sec (±8.72%) 1.05
Logging an object on root logger 566873 ops/sec (±6.64%) 655434 ops/sec (±7.25%) 1.16
Logging an object with a message on root logger 6631 ops/sec (±207.86%) 3522 ops/sec (±223.79%) 0.53
Logging an object with a redacted prop on root logger 426747 ops/sec (±17.67%) 471568 ops/sec (±8.55%) 1.11
Logging a nested 3-level object on root logger 327272 ops/sec (±3.51%) 340636 ops/sec (±6.43%) 1.04

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

Please sign in to comment.