-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Diego Ferreiro Val
committed
Jun 19, 2019
1 parent
91ecf4f
commit baf1f42
Showing
4 changed files
with
54 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from "./config"; | ||
export * from "./benchmark"; | ||
export * from "./stats"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { BenchmarkMetricNames } from "./benchmark"; | ||
|
||
export type BenchmarkStatsNames = "samples" | "sampleSize" | "samplesQuantileThreshold" | "mean" | "median" | "variance" | "medianAbsoluteDeviation"; | ||
export interface BenchmarkStats { | ||
samples: number[], | ||
sampleSize: number, | ||
samplesQuantileThreshold: number, | ||
mean: number, | ||
median: number, | ||
variance: number, | ||
medianAbsoluteDeviation: number, | ||
} | ||
|
||
export type BenchmarkMetricsAggregate = { [key in BenchmarkMetricNames]?: number[] } | ||
export type BenchmarkMetricStatsMap = { [key in BenchmarkMetricNames]?: BenchmarkStats; } | ||
|
||
// This type will hold as keys all benchmark names, and then an array with all results | ||
export interface AllBenchmarksMetricsMap { [key: string]: BenchmarkMetricsAggregate } | ||
export interface AllBenchmarkMetricStatsMap { [key: string]: BenchmarkMetricStatsMap; } | ||
|
||
export type MetricsStatsMap = { | ||
[key in BenchmarkMetricNames]?: { | ||
stats: { | ||
[key in BenchmarkStatsNames]?: BenchmarkStats | ||
} | ||
} | ||
} | ||
|
||
export interface StatsNode { | ||
type: "group" | "benchmark"; | ||
name: string; | ||
nodes?: StatsNode[]; | ||
metrics?: MetricsStatsMap | ||
} |