tscircuit/autorouting-dataset-01

This code manages the hardware and electronic components for circuit design and PCB layout, defining components like resistors, capacitors, transistors, connectors, and footprints, and providing tools for component placement, PCB topology, and electrical connections.

Version
1.0.102
License
unset
Stars
4

scripts/run-benchmark/buildBenchmarkSummaryJson.ts

import { buildBenchmarkTableRows } from "scripts/run-benchmark/buildBenchmarkTableRows"
import type { BenchmarkRow } from "types/run-benchmark/BenchmarkRow"
import type { Scenario } from "types/run-benchmark/Scenario"

/**
 * Build JSON summary output for benchmark results.
 */
const buildBenchmarkSummaryJson = (inputs: {
  resultRowList: BenchmarkRow[]
  scenarioList: Scenario[]
}): {
  tableHeaderList: string[]
  tableRowList: string[][]
  scenarioCount: number
} => {
  const { resultRowList, scenarioList } = inputs
  const { tableHeaderList, tableRowList } = buildBenchmarkTableRows({
    resultRowList,
  })

  return {
    tableHeaderList,
    tableRowList,
    scenarioCount: scenarioList.length,
  }
}

export { buildBenchmarkSummaryJson }