terra-draw 1.15.0 → 1.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,33 @@
1
+ import { FeatureId } from "../extend";
2
+ import { GeoJSONStoreFeatures, TerraDraw } from "../terra-draw";
3
+ import { Bench } from "tinybench";
4
+ type BenchmarkResult = {
5
+ name: string;
6
+ opsPerSecond: number;
7
+ averageTimeMs: number;
8
+ };
9
+ export declare const createPointFeatures: (n: number) => GeoJSONStoreFeatures[];
10
+ export declare const createDraw: () => TerraDraw;
11
+ type BenchmarkProps = {
12
+ draw: TerraDraw;
13
+ features: GeoJSONStoreFeatures[];
14
+ featureIds: FeatureId[];
15
+ randomFeatureId: FeatureId;
16
+ };
17
+ export type BenchmarkTask = {
18
+ name: string;
19
+ beforeEach: (benchmarkProps: BenchmarkProps) => void;
20
+ task: (benchmarkProps: BenchmarkProps) => void;
21
+ featureCount?: number;
22
+ loopCount?: number;
23
+ enabled?: boolean;
24
+ };
25
+ export declare const createBenchmark: (benmarkName: string, tasks: BenchmarkTask[]) => Bench;
26
+ export declare const processBenchmarks: (bench: Bench, benchmarkTasks: BenchmarkTask[]) => BenchmarkResult[];
27
+ export declare function writeBenchmarkSummary(results: BenchmarkResult[]): void;
28
+ export declare const logBenchmarkResults: (results: {
29
+ name: string;
30
+ opsPerSecond: number;
31
+ averageTimeMs: number;
32
+ }[]) => void;
33
+ export {};
@@ -0,0 +1 @@
1
+ export {};