@@ -321,11 +321,15 @@ func generatePRComment(energyStats []*EnergyStats, version string) string {
321321	fmt .Fprintf (& comment , "The following benchmark tests for version %s had statistically significant changes (i.e., |z-score| > 1.96):\n \n " , version )
322322
323323	w  :=  tabwriter .NewWriter (& comment , 0 , 0 , 1 , ' ' , 0 )
324- 	fmt .Fprintln (w , "| Benchmark\t | Measurement\t | H-Score \t | Z-Score \t | % Change \t | Stable Reg \t | Patch Value \t |" )
325- 	fmt .Fprintln (w , "| ---------\t | -----------\t | -------\t | -------\t | --------\t | ---------- \t | ---- -------\t |" )
324+ 	fmt .Fprintln (w , "| Benchmark\t | Measurement\t | % Change \t | Patch Value \t | Stable Region \t | H-Score \t | Z-Score \t |  " )
325+ 	fmt .Fprintln (w , "| ---------\t | -----------\t | -------- \t | ----------- \t | ------------- \t | -------\t | -------\t |" )
326326
327327	var  significantEnergyStats  []EnergyStats 
328328	for  _ , es  :=  range  energyStats  {
329+ 		// The "iterations" measurement is the number of iterations that the Go 
330+ 		// benchmark suite had to run to converge on a benchmark measurement. It 
331+ 		// is not comparable between benchmark runs, so is not a useful 
332+ 		// measurement to print here. Omit it. 
329333		if  es .Measurement  !=  "iterations"  &&  math .Abs (es .ZScore ) >  1.96  {
330334			significantEnergyStats  =  append (significantEnergyStats , * es )
331335		}
@@ -339,7 +343,7 @@ func generatePRComment(energyStats []*EnergyStats, version string) string {
339343			return  math .Abs (significantEnergyStats [i ].PercentChange ) >  math .Abs (significantEnergyStats [j ].PercentChange )
340344		})
341345		for  _ , es  :=  range  significantEnergyStats  {
342- 			fmt .Fprintf (w , "| %s\t | %s\t | %.4f\t | %.4f\t | %.4f \t |  Avg: %.4f, Med: %.4f, Stdev: %.4f\t | %.4f\t |\ n " , es .Benchmark , es .Measurement , es .HScore , es .ZScore , es .PercentChange ,  es . StableRegion .Mean , es .StableRegion .Median , es .StableRegion .Std , es .MeasurementVal )
346+ 			fmt .Fprintf (w , "| %s\t | %s\t | %.4f\t | %.4f\t | Avg: %.4f, Med: %.4f, Stdev: %.4f\t | %.4f\t | %.4f \t | \ n " , es .Benchmark , es .Measurement , es .PercentChange , es .MeasurementVal , es .StableRegion .Mean , es .StableRegion .Median , es .StableRegion .Std , es .HScore ,  es . ZScore )
343347		}
344348	}
345349	w .Flush ()
0 commit comments