Skip to content

Commit 11b6454

Browse files
Add subtitles to benchmark charts. (#522)
They include a little more context about what each of the benchmarks are showing. --------- Co-authored-by: Andrew Farries <[email protected]>
1 parent d1db25d commit 11b6454

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

dev/benchmark-results/build.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ func buildCharts(inputFile, outputFile string) error {
5858
page.SetLayout("flex")
5959

6060
for _, c := range allCharts {
61+
c.Subtitle = getSubTitle(c.Title.Title)
6162
page.AddCharts(c)
6263
}
6364

@@ -243,6 +244,21 @@ func shortSHA(sha string) string {
243244
return sha[:7]
244245
}
245246

247+
func getSubTitle(title string) string {
248+
switch {
249+
case strings.HasPrefix(title, "Backfill"):
250+
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."
251+
case strings.HasPrefix(title, "WriteAmplification/NoTrigger"):
252+
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."
253+
case strings.HasPrefix(title, "WriteAmplification/WithTrigger"):
254+
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."
255+
case strings.HasPrefix(title, "ReadSchema"):
256+
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"
257+
}
258+
259+
return ""
260+
}
261+
246262
type BenchmarkReports struct {
247263
GitSHA string
248264
PostgresVersion string

0 commit comments

Comments
 (0)