Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions devops/scripts/benchmarks/history.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,18 @@ def create_run(self, name: str, results: list[Result]) -> BenchmarkRun:
git_hash = "unknown"
github_repo = None

compute_runtime = (
options.compute_runtime_tag if options.build_compute_runtime else None
)

return BenchmarkRun(
name=name,
git_hash=git_hash,
github_repo=github_repo,
date=datetime.now(tz=timezone.utc),
results=results,
hostname=socket.gethostname(),
compute_runtime=compute_runtime,
)

def save(self, save_name, results: list[Result], to_file=True):
Expand Down
39 changes: 18 additions & 21 deletions devops/scripts/benchmarks/html/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ function createChart(data, containerId, type) {
`Value: ${point.y.toFixed(2)} ${data.unit}`,
`Stddev: ${point.stddev.toFixed(2)} ${data.unit}`,
`Git Hash: ${point.gitHash}`,
`Compute Runtime: ${point.compute_runtime}`,
];
} else {
return [`${context.dataset.label}:`,
Expand Down Expand Up @@ -145,7 +146,7 @@ function createChart(data, containerId, type) {
const chartConfig = {
type: type === 'time' ? 'line' : 'bar',
data: type === 'time' ? {
datasets: createTimeseriesDatasets(data)
datasets: Object.values(data.runs)
} : {
labels: data.labels,
datasets: data.datasets
Expand Down Expand Up @@ -677,36 +678,32 @@ function processLayerComparisonsData(benchmarkRuns) {
return Object.values(groupedResults);
}

function createRunDataStructure(run, result, label) {
return {
runName: run.name,
points: [{
date: new Date(run.date),
value: result.value,
stddev: result.stddev,
git_hash: run.git_hash,
github_repo: run.github_repo,
label: label || result.label
}]
};
}

function addRunDataPoint(group, run, result, name = null) {
const runKey = name || result.label + ' (' + run.name + ')';

if (!group.runs[runKey]) {
const datasetIndex = Object.keys(group.runs).length;
group.runs[runKey] = {
label: runKey,
runName: run.name,
points: []
data: [],
borderColor: colorPalette[datasetIndex % colorPalette.length],
backgroundColor: colorPalette[datasetIndex % colorPalette.length],
borderWidth: 1,
pointRadius: 3,
pointStyle: 'circle',
pointHoverRadius: 5
};
}

group.runs[runKey].points.push({
date: new Date(run.date),
value: result.value,
group.runs[runKey].data.push({
seriesName: runKey,
x: new Date(run.date),
y: result.value,
stddev: result.stddev,
git_hash: run.git_hash,
github_repo: run.github_repo,
gitHash: run.git_hash,
gitRepo: run.github_repo,
compute_runtime: run.compute_runtime
});

return group;
Expand Down
1 change: 1 addition & 0 deletions devops/scripts/benchmarks/utils/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class BenchmarkRun:
default=None,
metadata=config(encoder=datetime.isoformat, decoder=datetime.fromisoformat),
)
compute_runtime: str = "Unknown"


@dataclass_json
Expand Down
Loading