the editable site (validation-lab)
This commit is contained in:
commit
3ac81d5a52
13454 files changed
+2227005
No files matched your search
+33
@@ -0,0 +1,33 @@
|
||||
import { FeatureId } from "../extend";
|
||||
import { GeoJSONStoreFeatures, TerraDraw } from "../terra-draw";
|
||||
import { Bench } from "tinybench";
|
||||
type BenchmarkResult = {
|
||||
name: string;
|
||||
opsPerSecond: number;
|
||||
averageTimeMs: number;
|
||||
};
|
||||
export declare const createPointFeatures: (n: number) => GeoJSONStoreFeatures[];
|
||||
export declare const createDraw: () => TerraDraw;
|
||||
type BenchmarkProps = {
|
||||
draw: TerraDraw;
|
||||
features: GeoJSONStoreFeatures[];
|
||||
featureIds: FeatureId[];
|
||||
randomFeatureId: FeatureId;
|
||||
};
|
||||
export type BenchmarkTask = {
|
||||
name: string;
|
||||
beforeEach: (benchmarkProps: BenchmarkProps) => void;
|
||||
task: (benchmarkProps: BenchmarkProps) => void;
|
||||
featureCount?: number;
|
||||
loopCount?: number;
|
||||
enabled?: boolean;
|
||||
};
|
||||
export declare const createBenchmark: (benmarkName: string, tasks: BenchmarkTask[]) => Bench;
|
||||
export declare const processBenchmarks: (bench: Bench, benchmarkTasks: BenchmarkTask[]) => BenchmarkResult[];
|
||||
export declare function writeBenchmarkSummary(results: BenchmarkResult[]): void;
|
||||
export declare const logBenchmarkResults: (results: {
|
||||
name: string;
|
||||
opsPerSecond: number;
|
||||
averageTimeMs: number;
|
||||
}[]) => void;
|
||||
export {};
|
||||
Reference in new issue
Block a user