[perf] update plot builder to support anomaly information

DataPoint is updated to include a boolean field to determine
whether the given point is an anomaly.

This should likely be updated in the future to contain actual
details of the actual anomaly, but for the sake of integrating
Google Charts, this should be sufficient for now.

Bug: b/362831653
Change-Id: I3a4603196eb29bcf1ccc2b3f574e17017980f516
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/894520
Reviewed-by: Ashwin Verleker <ashwinpv@google.com>
Commit-Queue: Jeff Yoon <jeffyoon@google.com>
diff --git a/perf/modules/common/plot-builder.ts b/perf/modules/common/plot-builder.ts
index 485d022..acc4333 100644
--- a/perf/modules/common/plot-builder.ts
+++ b/perf/modules/common/plot-builder.ts
@@ -5,6 +5,7 @@
 export interface DataPoint {
   x: number | Date;
   y: number;
+  anomaly: boolean;
 }
 
 export enum ChartAxisFormat {
diff --git a/perf/modules/common/plot-util.ts b/perf/modules/common/plot-util.ts
index 49a647b..0af0534 100644
--- a/perf/modules/common/plot-util.ts
+++ b/perf/modules/common/plot-util.ts
@@ -117,6 +117,7 @@
         const dataPoint: DataPoint = {
           x: xLabels[i],
           y: trace[i],
+          anomaly: false,
         };
         traceDataPoints.push(dataPoint);
       }
diff --git a/perf/modules/plot-summary-sk/plot-summary-sk-demo.ts b/perf/modules/plot-summary-sk/plot-summary-sk-demo.ts
index 87d805e..20ed80d 100644
--- a/perf/modules/plot-summary-sk/plot-summary-sk-demo.ts
+++ b/perf/modules/plot-summary-sk/plot-summary-sk-demo.ts
@@ -26,21 +26,21 @@
     chartAxisFormat: ChartAxisFormat.Date,
     lines: {
       test: [
-        { x: new Date('2023/10/1'), y: 1 },
-        { x: new Date('2023/10/2'), y: 1 },
-        { x: new Date('2023/10/3'), y: 1 },
-        { x: new Date('2023/10/4'), y: 4 },
-        { x: new Date('2023/10/5'), y: 6 },
-        { x: new Date('2023/10/6'), y: 3 },
-        { x: new Date('2023/10/7'), y: 2 },
-        { x: new Date('2023/10/8'), y: 1 },
-        { x: new Date('2023/10/9'), y: 1 },
-        { x: new Date('2023/10/10'), y: 1 },
-        { x: new Date('2023/10/11'), y: 4 },
-        { x: new Date('2023/10/12'), y: 6 },
-        { x: new Date('2023/10/13'), y: 3 },
-        { x: new Date('2023/10/14'), y: 2 },
-        { x: new Date('2023/10/15'), y: 1 },
+        { x: new Date('2023/10/1'), y: 1, anomaly: false },
+        { x: new Date('2023/10/2'), y: 1, anomaly: false },
+        { x: new Date('2023/10/3'), y: 1, anomaly: false },
+        { x: new Date('2023/10/4'), y: 4, anomaly: false },
+        { x: new Date('2023/10/5'), y: 6, anomaly: false },
+        { x: new Date('2023/10/6'), y: 3, anomaly: false },
+        { x: new Date('2023/10/7'), y: 2, anomaly: false },
+        { x: new Date('2023/10/8'), y: 1, anomaly: false },
+        { x: new Date('2023/10/9'), y: 1, anomaly: false },
+        { x: new Date('2023/10/10'), y: 1, anomaly: false },
+        { x: new Date('2023/10/11'), y: 4, anomaly: false },
+        { x: new Date('2023/10/12'), y: 6, anomaly: false },
+        { x: new Date('2023/10/13'), y: 3, anomaly: false },
+        { x: new Date('2023/10/14'), y: 2, anomaly: false },
+        { x: new Date('2023/10/15'), y: 1, anomaly: false },
       ],
     },
     start: new Date('2023/10/1'),
diff --git a/perf/modules/plot-summary-sk/plot-summary-sk_test.ts b/perf/modules/plot-summary-sk/plot-summary-sk_test.ts
index 4636e56..7d745ff 100644
--- a/perf/modules/plot-summary-sk/plot-summary-sk_test.ts
+++ b/perf/modules/plot-summary-sk/plot-summary-sk_test.ts
@@ -29,15 +29,15 @@
       const chartData: ChartData = {
         lines: {
           test: [
-            { x: 1, y: 1 },
-            { x: 2, y: 2 },
-            { x: 3, y: 3 },
-            { x: 4, y: 4 },
-            { x: 5, y: 5 },
-            { x: 6, y: 6 },
-            { x: 7, y: 7 },
-            { x: 8, y: 8 },
-            { x: 9, y: 9 },
+            { x: 1, y: 1, anomaly: false },
+            { x: 2, y: 2, anomaly: false },
+            { x: 3, y: 3, anomaly: false },
+            { x: 4, y: 4, anomaly: false },
+            { x: 5, y: 5, anomaly: false },
+            { x: 6, y: 6, anomaly: false },
+            { x: 7, y: 7, anomaly: false },
+            { x: 8, y: 8, anomaly: false },
+            { x: 9, y: 9, anomaly: false },
           ],
         },
         chartAxisFormat: ChartAxisFormat.Commit,