Skip to main content
POST
/
v1
/
benchmarks
/
start_run
JavaScript
import Runloop from '@runloop/api-client';

const client = new Runloop({
  bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});

const benchmarkRunView = await client.benchmarks.startRun({ benchmark_id: 'benchmark_id' });

console.log(benchmarkRunView.id);
{
  "id": "<string>",
  "benchmark_id": "<string>",
  "start_time_ms": 123,
  "state": "running",
  "metadata": {},
  "name": "<string>",
  "duration_ms": 123,
  "score": 123,
  "purpose": "<string>",
  "environment_variables": {},
  "secrets_provided": {}
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
benchmark_id
string
required

ID of the Benchmark to run.

run_name
string | null

Display name of the run.

metadata
object

User defined metadata to attach to the benchmark run for organization.

runProfile
object

Runtime configuration to use for this benchmark run

Response

200 - application/json

OK

A BenchmarkRunView represents a run of a complete set of Scenarios, organized under a Benchmark.

id
string
required

The ID of the BenchmarkRun.

benchmark_id
string
required

The ID of the Benchmark.

start_time_ms
integer<int64>
required

The time the benchmark run execution started (Unix timestamp milliseconds).

state
enum<string>
required

The state of the BenchmarkRun.

Available options:
running,
canceled,
completed
metadata
object
required

User defined metadata to attach to the benchmark run for organization.

name
string | null

The name of the BenchmarkRun.

duration_ms
integer<int64> | null

The duration for the BenchmarkRun to complete.

score
number<float> | null

The final score across the BenchmarkRun, present once completed. Calculated as sum of scenario scores / number of scenario runs.

purpose
string | null

Purpose of the run.

environment_variables
object

Environment variables used to run the benchmark.

secrets_provided
object

User secrets used to run the benchmark. Example: {"DB_PASS": "DATABASE_PASSWORD"} would set the environment variable 'DB_PASS' on all scenario devboxes to the value of the secret 'DATABASE_PASSWORD'.