INNER CODE UNIT · TypeScript
AutocannonExecutor
hasura/graphql-bench · app/queries/src/executors/autocannon/index.ts:29
export class AutocannonExecutor extends BenchmarkExecutor {
public tool = BenchmarkTool.AUTOCANNON
private reportPath = path.join(this.baseReportPath, 'autocannon')
private _makeSharedFields(bench: Benchmark): AutocannonOptions {
return {
url: this.config.url,
headers: this.config.headers,
method: 'POST',
connections: bench.connections || 10,
body: JSON.stringify({
query: bench.query,
variables: bench.variables,
}),
}
}
public runCustomBench(bench: CustomBenchmark) {