Format flake rates into CSV containing environment, test, and flake rate.

pull/11602/head
Andriy Dzikh 2021-06-03 14:25:04 -07:00
parent d245cfcdf7
commit cec82877d8
1 changed files with 2 additions and 3 deletions

View File

@ -45,12 +45,11 @@ func main() {
splitEntries := SplitData(testEntries)
filteredEntries := FilterRecentEntries(splitEntries, *dateRange)
flakeRates := ComputeFlakeRates(filteredEntries)
fmt.Println("Environment,Test,Flake Rate")
for environment, environmentSplit := range flakeRates {
fmt.Printf("%s {\n", environment)
for test, flakeRate := range environmentSplit {
fmt.Printf(" %s: %f\n", test, flakeRate)
fmt.Printf("%s,%s,%f\n", environment, test, flakeRate)
}
fmt.Printf("}\n")
}
}