Skip to content

Commit

Permalink
Add script to do statisical check on results
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
  • Loading branch information
Alan Jowett committed Nov 3, 2023
1 parent d2c32f1 commit cbb1bef
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 cbb1bef

Please sign in to comment.