Skip to content

Commit e4f496b

Browse files
committed
Only include major library version in exported data.
- prevents unnecessary file redownloads on dot releases on files which otherwise do not contain new data - on the library side we only check for major version - any change to the data format should never be anything but a breaking change, causing a major version bump
1 parent 0c6b3f5 commit e4f496b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/update_benchmarks.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import { BenchmarkRow } from './types';
1515
// Package
1616
import { version } from '../package.json';
1717

18+
const libraryMajorVersion = version.split('.')[0];
19+
1820
const BENCHMARK_URL = `https://gfxbench.com/result.jsp?benchmark=gfx50&test=544&text-filter=&order=median&ff-lmobile=true&ff-smobile=true&os-Android_gl=true&os-Android_vulkan=true&os-iOS_gl=true&os-iOS_metal=true&os-Linux_gl=true&os-OS_X_gl=true&os-OS_X_metal=true&os-Windows_dx=true&os-Windows_dx12=true&os-Windows_gl=true&os-Windows_vulkan=true&pu-dGPU=true&pu-iGPU=true&pu-GPU=true&arch-ARM=true&arch-unknown=true&arch-x86=true&base=device`;
1921

2022
const TYPES = [
@@ -129,7 +131,7 @@ type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
129131
),
130132
]
131133
);
132-
const data = [version, ...serializedModels];
134+
const data = [libraryMajorVersion, ...serializedModels];
133135
await Promise.all(
134136
[true, false].map(async (minified) => {
135137
const file = `./benchmarks${minified ? '-min' : ''}/${

0 commit comments

Comments
 (0)