Skip to content

Commit

Permalink
Add subtitles to benchmark charts. (#522)
Browse files Browse the repository at this point in the history
They include a little more context about what each of the benchmarks are
showing.

---------

Co-authored-by: Andrew Farries <[email protected]>
  • Loading branch information
ryanslade and andrew-farries authored Dec 11, 2024
1 parent d1db25d commit 11b6454
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions dev/benchmark-results/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ func buildCharts(inputFile, outputFile string) error {
page.SetLayout("flex")

for _, c := range allCharts {
c.Subtitle = getSubTitle(c.Title.Title)
page.AddCharts(c)
}

Expand Down Expand Up @@ -243,6 +244,21 @@ func shortSHA(sha string) string {
return sha[:7]
}

func getSubTitle(title string) string {
switch {
case strings.HasPrefix(title, "Backfill"):
return "Each line represents the rows per second backfilled for a database with the row count indicated. The x-axis shows the commits to main ordered by time."
case strings.HasPrefix(title, "WriteAmplification/NoTrigger"):
return "Each line represents the rows per second written for a database with the row count indicated. This is a baseline benchmark without the pgroll trigger. The x-axis shows the commits to main ordered by time."
case strings.HasPrefix(title, "WriteAmplification/WithTrigger"):
return "Each line represents the rows per second written for a database with the row count indicated. This is a benchmark with the pgroll trigger installed and should be compared with the WriteAmplification/NoTrigger benchmarks. The x-axis shows the commits to main ordered by time."
case strings.HasPrefix(title, "ReadSchema"):
return "This benchmark shows the executions per second of an important internal SQL function, ReadSchema. The x-axis shows the commits to main ordered by time"
}

return ""
}

type BenchmarkReports struct {
GitSHA string
PostgresVersion string
Expand Down

0 comments on commit 11b6454

Please sign in to comment.