@@ -85,6 +85,7 @@ type EnergyStats struct {
8585 E float64
8686 T float64
8787 H float64
88+ Z float64
8889}
8990
9091func main () {
@@ -217,6 +218,7 @@ func getEnergyStatsForOneBenchmark(rd RawData, coll *mongo.Collection) ([]*Energ
217218 E : e ,
218219 T : t ,
219220 H : h ,
221+ Z : GetZScore (patchVal [0 ], stableRegion .Mean , stableRegion .Std ),
220222 }
221223 energyStats = append (energyStats , & es )
222224 }
@@ -242,12 +244,13 @@ func generatePRComment(energyStats []*EnergyStats, version string) string {
242244 var testCount int64
243245
244246 comment .WriteString ("# 👋GoDriver Performance\n " )
245- fmt .Fprintf (& comment , "The following benchmark tests for version %s had statistically significant changes (i.e., h -score > 0.6 ):\n " , version )
246- comment .WriteString ("| Benchmark | Measurement | H-Score | Stable Reg Avg,Med,Std | Patch Value |\n | --- | --- | --- | --- | --- |\n " )
247+ fmt .Fprintf (& comment , "The following benchmark tests for version %s had statistically significant changes (i.e., |z -score| > 1.96 ):\n " , version )
248+ comment .WriteString ("| Benchmark | Measurement | H-Score | Z-Score | Stable Reg Avg,Med,Std | Patch Value |\n | --- | --- | --- | --- | --- | --- |\n " )
247249 for _ , es := range energyStats {
248250 testCount += 1
249- if es .H > 0.6 {
250- fmt .Fprintf (& comment , "| %s | %s | %.4f | %.4f,%.4f,%.4f | %.4f |\n " , es .Benchmark , es .Measurement , es .H , es .StableRegion .Mean , es .StableRegion .Median , es .StableRegion .Std , es .PatchValues [0 ])
251+ // if es.H > 0.6 {
252+ if es .Z > 1.96 || es .Z < - 1.96 {
253+ fmt .Fprintf (& comment , "| %s | %s | %.4f | %.4f | %.4f,%.4f,%.4f | %.4f |\n " , es .Benchmark , es .Measurement , es .H , es .Z , es .StableRegion .Mean , es .StableRegion .Median , es .StableRegion .Std , es .PatchValues [0 ])
251254 }
252255 }
253256
0 commit comments