in perf-tools/scenarios/e2e_perf.go [223:244]
func ParseTableFromQPSStatistics(statistics *profiling.QPSStatistics, orderedKeys []framework.TaskConditionType) *utils.Table {
var data [][]string
if len(orderedKeys) > 0 {
for _, key := range orderedKeys {
if stat := getStageQPS(statistics.StagesQPS, ")"+string(key)); stat != nil {
rowData := []string{stat.To, strconv.Itoa(stat.MaxQPS),
fmt.Sprintf("%.2f", stat.AvgQPS), fmt.Sprintf("%+v", stat.Samples)}
data = append(data, rowData)
}
}
} else {
for _, stat := range statistics.StagesQPS {
rowData := []string{stat.To, strconv.Itoa(stat.MaxQPS),
fmt.Sprintf("%.2f", stat.AvgQPS), fmt.Sprintf("%+v", stat.Samples)}
data = append(data, rowData)
}
}
return &utils.Table{
Headers: []string{"To", "MaxQPS", "AvgQPS", "Samples"},
Data: data,
}
}