Skip to content

Commit

Permalink
Merge pull request #18 from Alan-Jowett/stats_check
Browse files Browse the repository at this point in the history
Add script to do statisical check on results
  • Loading branch information
Alan-Jowett authored Nov 7, 2023
2 parents d2c32f1 + cbb1bef commit 3bcd8f4
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions scripts/check_perf_results.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
Copyright (c) Microsoft Corporation
SPDX-License-Identifier: MIT
*/
WITH samples AS (
SELECT metric, value, "timestamp",
ROW_NUMBER() OVER (PARTITION BY metric ORDER BY "timestamp" DESC) AS row_num
FROM benchmarkresults
WHERE platform = 'Windows 2019'
AND repository = 'microsoft/ebpf-for-windows'
AND "timestamp" >= NOW() - INTERVAL '30 days'
),
stats AS (
SELECT metric,
AVG(value) as mean_value,
STDDEV(value) as stddev_value
FROM benchmarkresults
WHERE platform = 'Windows 2019'
AND repository = 'microsoft/ebpf-for-windows'
AND "timestamp" >= NOW() - INTERVAL '30 days'
GROUP BY metric
)
SELECT samples.timestamp, samples.metric, samples.value, stats.mean_value, stats.stddev_value
FROM samples
INNER JOIN stats ON samples.metric = stats.metric
WHERE ABS(samples.value - stats.mean_value) >= 2 * stats.stddev_value AND row_num = 1;

0 comments on commit 3bcd8f4

Please sign in to comment.