From 286c38bd1ae34870c40986e8ddebfd65d6e5049e Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Thu, 13 Jun 2024 20:30:13 +0200 Subject: pkg/stats: split out pkg/stats/sample This will reduce the number of dependencies needed for the main syzkaller tools. --- tools/syz-testbed/table.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tools/syz-testbed/table.go') diff --git a/tools/syz-testbed/table.go b/tools/syz-testbed/table.go index ee3ffd0e7..fae3e2279 100644 --- a/tools/syz-testbed/table.go +++ b/tools/syz-testbed/table.go @@ -10,7 +10,7 @@ import ( "os" "sort" - "github.com/google/syzkaller/pkg/stats" + "github.com/google/syzkaller/pkg/stats/sample" ) type Cell = interface{} @@ -25,7 +25,7 @@ type Table struct { type ValueCell struct { Value float64 - Sample *stats.Sample + Sample *sample.Sample PercentChange *float64 PValue *float64 } @@ -39,7 +39,7 @@ type BoolCell struct { Value bool } -func NewValueCell(sample *stats.Sample) *ValueCell { +func NewValueCell(sample *sample.Sample) *ValueCell { return &ValueCell{Value: sample.Median(), Sample: sample} } @@ -183,7 +183,7 @@ func (t *Table) SetRelativeValues(baseColumn string) error { } cellSample := valueCell.Sample.RemoveOutliers() - pval, err := stats.UTest(baseSample, cellSample) + pval, err := sample.UTest(baseSample, cellSample) if err == nil { // Sometimes it fails because there are too few samples. valueCell.PValue = new(float64) -- cgit mrf-deployment