How to use the tracerbench.analyze function in tracerbench

To help you get started, we’ve selected a few tracerbench examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TracerBench / tracerbench / packages / cli / src / commands / analyze.ts View on Github external
const file = traceJSONOutput;
    let archiveFile;
    let rawTraceData;
    try {
      rawTraceData = JSON.parse(fs.readFileSync(traceJSONOutput, 'utf8'));
    } catch (error) {
      this.error(`Could not find file: ${traceJSONOutput}, ${error}`);
    }

    try {
      archiveFile = JSON.parse(fs.readFileSync(archive, 'utf8'));
    } catch (error) {
      this.error(`Could not find archive file: ${archive}, ${error}`);
    }

    await analyze({
      archiveFile,
      event,
      file,
      methods,
      rawTraceData,
      report,
    });
  }
}

tracerbench

CLI for TracerBench

BSD-2-Clause
Latest version published 2 years ago

Package Health Score

46 / 100
Full package analysis

Popular tracerbench functions