Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

roachprod-microbench: change sheet order #110448

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pkg/cmd/roachprod-microbench/google/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,13 @@ func (srv *Service) CreateSheet(
var s sheets.Spreadsheet
s.Properties = &sheets.SpreadsheetProperties{Title: name}

// Sort sheets by name.
// Sort sheets by name in reverse order. This ensures `sec/op` is the first
// sheet and metric in the summary.
Copy link
Contributor

@renatolabs renatolabs Sep 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I see how this works, but if we add a new sheet (watts/sec) this will quietly break. Are we ok with that? My understanding is that we are since we will eventually be looking at Prometheus as source of truth.

sheetNames := make([]string, 0, len(metricMap))
for sheetName := range metricMap {
sheetNames = append(sheetNames, sheetName)
}
sort.Strings(sheetNames)
sort.Sort(sort.Reverse(sort.StringSlice(sheetNames)))

// Raw data sheets.
sheetInfos := make([]rawSheetInfo, len(metricMap))
Expand Down