Skip to content

Commit

Permalink
Start adding benchmark.envs
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Aug 18, 2019
1 parent 1db4047 commit 9d040f9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/info/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@ export const addBenchmarkInfo = function({ iterations, opts, versions }) {
const id = uuidv4()
const timestamp = new Date().toISOString()

const optsA = getOpts(opts)
const envs = getEnvs({ opts })

const system = getSystem(versions)

return { id, timestamp, opts: optsA, system, iterations }
return { id, timestamp, envs, system, iterations }
}

// Retrieve current `env` (options + system) and set it to `benchmark.envs`
export const getEnvs = function({ opts, opts: { env } }) {
const optsA = getOpts(opts)
return [{ id: env, title: env, opts: optsA }]
}

0 comments on commit 9d040f9

Please sign in to comment.