[CBB] Refine tool to convert CBB v3 data to v4
Adjust the heuristic to place CBB v3 data on the x-axis of Skia perf
dashboard. The previous placement was too uneven.
Bug: b/433796695
Change-Id: Idd398a93272c0abdf3e91cb100826ef80eb953b1
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/1058034
Reviewed-by: Farid (Mojtaba) Faridzad <faridzad@google.com>
Commit-Queue: John Chen <zhanliang@google.com>
diff --git a/pinpoint/go/cbb/upload_v3_data/main.go b/pinpoint/go/cbb/upload_v3_data/main.go
index 01e5e20..fce4a2b 100644
--- a/pinpoint/go/cbb/upload_v3_data/main.go
+++ b/pinpoint/go/cbb/upload_v3_data/main.go
@@ -10,6 +10,7 @@
// data to a CSV file.
// blaze run //experimental/users/zhanliang/cbb/download_f1 -- --output ~/cbb/cbb_v3_data.csv
// * Run this script to convert CBB v3 data into the appropriate JSON files.
+// bazelisk run //pinpoint/go/cbb/upload_v3_data
// Then review these JSON files to make sure they were generated correctly.
// * Elevate to breakglass permission.
// * Run the following command to upload the JSON files to pers dashboard.
@@ -129,8 +130,6 @@
"18.6 (20621.3.11.11.3)": 1493855,
}
var safariTPCP = map[string]int{
- "18.4 (Release 219, 20622.1.12)": 1475903,
- "18.4 (Release 220, 20622.1.14.5)": 1488562,
"26.0 (Release 223, 20622.1.18.11.5)": 1491633,
"26.0 (Release 224, 20622.1.20.1)": 1493750,
"26.0 (Release 225, 20623.1.1.1)": 1499125,
@@ -216,12 +215,12 @@
// Since we can't go back in time to create CBB reference files for old releases,
// we use fake commit positions. The following formulas are selected to convert
// Chrome commit numbers to relatively even-spaced fake commit positions
- // between 1350000 and 1430000, roughly corresponding to the time period covered
+ // between 1350000 and 1470000, roughly corresponding to the time period covered
// by the legacy CBB data we are copying.
if isStable {
- return (parts[0]+7)*10000 + parts[3]*10
+ return parts[0]*14000 + parts[3]*100 - 445000
} else {
- return (parts[2]+3000)*140 + parts[3]*10
+ return parts[2]*215 + parts[3]*20 - 80000
}
}