This repository was archived by the owner on Jan 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathmako.proto
2257 lines (1996 loc) · 82.3 KB
/
mako.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Mako public protobufs
//
// These protobufs define all public Mako data supplied by user code,
// used in interactions with and between mako component implementations,
// and stored persistenly.
//
// Required vs. optional fields:
// All fields are declared as "optional", because this makes working with
// protocol buffers easier to maintain. However, mako does require some
// fields to be set, and consistently uses these comment labels:
// * REQUIRED - must be set (either by framework or user)
// * CONDITIONALLY_REQUIRED - may need to be set and followed by conditions
// * COMMON - is optional and commonly set
// * UNCOMMON - is optional and rarely set
// * FRAMEWORK_WRITE_ONLY - is only set by framework as needed
// * DEPRECATED - no longer used and ignored by the framework
syntax = "proto2";
package mako;
// -----------------------------------------------------------------------------
// Common - common messages found in many messages below
// -----------------------------------------------------------------------------
// Used in responses to indicate pass/fail
message Status {
enum Code {
SUCCESS = 0;
FAIL = 1;
}
// REQUIRED
// Request status code
optional Code code = 1;
// CONDITIONALLY_REQUIRED
// If failed, contains an error message
optional string fail_message = 2;
// OPTIONAL
// Lets the user know if an operation can be retried. Only set on failures.
optional bool retry = 3 [default = false];
// OPTIONAL
// Containing any warning messages. Warning messages may be emitted regardless
// of the success/failure code.
repeated string warning_messages = 4;
}
// Value (see below) metadata.
// One of these must be supplied for every value group from one of three
// types:
// input (one ValueInfo)
// metric (one ValueInfo for each)
// custom aggregate (one ValueInfo for each)
// NEXT_ID: 5
message ValueInfo {
enum Type {
// Value is numeric
NUMERIC = 1;
// Value is a unix timestamp in milliseconds.
// This type is only valid for input (x-axis) values.
// The fractional part of a millisecond value stored as type double is
// truncated in all conversions and comparisons. This provides an exact
// double representation for all millisecond values up to
// 2^53 (year 287396)
// http://play.golang.org/p/XQU86TAPuZ
TIMESTAMP = 2;
}
// REQUIRED
// Uniquely identifies this ValueInfo.
//
// Limitations:
// * It is repeatedly stored and used as a data lookup key, so for the best
// performance, it should be very short (one or two characters is best).
// * Each value_key used must be unique across all group types (i.e. you
// can't use the same key for an input value, metric, or custom
// aggregate).
// * These are the only legal characters:
// * Letters (A-Z, a-z)
// * Numbers (0-9)
optional string value_key = 1;
// REQUIRED
// Provides a user-friendly name for this ValueInfo that gets displayed
// on charts. This can be changed at any time without affecting the
// charting of historic RunInfo data, because that data only references
// the value_key.
//
// Limitations:
// * This should be relatively short, so it fits well in a chart legend.
// * Like value_key, this label must be unique for each metric.
// * All non-space printable ASCII characters
// (https://en.wikipedia.org/wiki/ASCII#Printable_characters)
// from !(33) to ~(126) are legal except:
// * " (34)
// * & (38)
// * ' (39)
// * , (44)
// * < (60)
// * > (62)
// * \ (92)
// * ` (96)
// Rationale for illegal chars:
// * Space creates undesired label wrapping in some third party
// javascript charting libraries.
// * Chars that need HTML escaping do not work reliably in all
// third party javascript charting libraries.
// * Comma is used for user entry as a delimiter.
// * Backslash is used as an escape char in some contexts.
optional string label = 2;
// UNCOMMON
// Provides an optional longer human readable description for this metric.
// This won't be shown directly on the charts, but can be used by vairious
// tools to explain the metric in more depth.
// TODO(b/156953203): show this description outside of the rendered charts on
// the Mako default web dashboard.
optional string description = 4;
// Determines the value type. If not set, NUMERIC is assumed.
optional Type type = 3;
}
// Pairs a Value with a ValueInfo
message KeyedValue {
// REQUIRED
// Matches a ValueInfo.value_key to associate this value with a supplied
// ValueInfo
optional string value_key = 1;
// REQUIRED
// Numeric or timestamp value
optional double value = 2;
}
// General purpose name/value string data pair
message NamedData {
// REQUIRED
// Name of data
optional string name = 1;
// REQUIRED
// String-serialized data. Format is user-specific.
optional string data = 2;
}
// Value range specifying [start, end]
// Limitations:
// * start must be <= end
message Range {
// REQUIRED
optional double start = 1;
// REQUIRED
optional double end = 2;
}
// A named value range. The label may get displayed on charts.
message LabeledRange {
// REQUIRED
optional string label = 1;
// REQUIRED
optional Range range = 2;
}
// Identify a unique set of measurements in Mako framework
message DataFilter {
enum DataType {
METRIC_AGGREGATE_COUNT = 11;
METRIC_AGGREGATE_MIN = 1;
METRIC_AGGREGATE_MAX = 2;
METRIC_AGGREGATE_MEAN = 3;
METRIC_AGGREGATE_MEDIAN = 4;
METRIC_AGGREGATE_STDDEV = 5;
METRIC_AGGREGATE_MAD = 12;
// Use percentile_milli_rank field below to specify percentile
METRIC_AGGREGATE_PERCENTILE = 6;
CUSTOM_AGGREGATE = 7;
METRIC_SAMPLEPOINTS = 8;
BENCHMARK_SCORE = 9;
ERROR_COUNT = 10;
}
// REQUIRED
// Specify which measurements inside the runs(s) you'd like to extract.
optional DataType data_type = 1;
// CONDITIONALLY_REQUIRED when DataType != BENCHMARK_SCORE or ERROR_COUNT
// Specify the ValueInfo.value_key of the measurements that you'd like to
// extract (eg. metric, custom aggregate)
optional string value_key = 2;
// CONDITIONALLY_REQUIRED when DataType != BENCHMARK_SCORE or ERROR_COUNT and
// value_key is not specified.
// Specify the ValueInfo.label of the measurements that you'd like to extract
// (e.g. metric, custom_aggregate). This field can only be used if the
// BenchmarkInfo definition at the time that this DataFilter is used has a
// ValueInfo of the appropriate kind (e.g. metric, custom_aggregate)
// corresponding to this label. An error will be returned when this DataFilter
// is used otherwise.
// If both value_key and label are specified, label must resolve to value_key,
// or an error will be returned.
optional string label = 5;
// CONDITIONALLY_REQUIRED when DataType == METRIC_AGGREGATE_PERCENTILE
//
// Specify a percentile rank that is also in
// Aggregate.percentile_milli_rank_list. Once located in
// percentile_milli_rank_list, the corresponding value
// will be extracted from Aggregate.MetricAggregate.percentile_list.
//
// See BenchmarkInfo.percentile_milli_rank_list for full description.
optional int32 percentile_milli_rank = 3;
// OPTIONAL
//
// By default, a run missing data will be ignored. By setting this flag to
// false, when searching for data specified by this filter in a run, it is an
// error if the data is missing.
//
// Warning: If true (default), the consumer of this data (eg. an analyzer)
// might not get as much data to operate on as your query specifies.
optional bool ignore_missing_data = 4 [default = true];
}
// Contains all measurements (aggregates via RunInfo and direct measurements via
// SampleBatches) about a single run.
message RunBundle {
// REQUIRED
optional BenchmarkInfo benchmark_info = 1;
// REQUIRED
optional RunInfo run_info = 2;
// CONDITIONALLY_REQUIRED
// Context (eg. only interested in aggregate data) might not require this list
// to be populated.
repeated SampleBatch batch_list = 3;
}
// Tool for tracking issues (e.g. bugs or feature requests) of a
// Mako project.
//
// NEXT_ID: 2
message IssueTrackerInfo {
message BuganizerConfig {
optional string component_id = 1;
}
optional BuganizerConfig buganizer_config = 1;
}
// -----------------------------------------------------------------------------
// Project Metadata
// -----------------------------------------------------------------------------
//
// Contains all information about a Mako project. A Mako project can
// have multiple benchmarks while a benchmark can belong to only one project. A
// project has its own set of owners. See owner_list field for project
// owner permissions.
//
// NEXT_ID: 5
message ProjectInfo {
// REQUIRED
// Uniquely identifies this project, and is used as a primary key. This is set
// by the project creator and is always evaluated as case-insensitive.
//
// Limitations:
// * No more than 100 characters
// * These are the only legal characters:
// * Letters (A-Z, a-z)
// * Numbers (0-9)
// * Hyphen (-)
// * Underscore (_)
// * Slash (/)
// * Dot (.)
// * Space ( )
optional string project_name = 1;
// OPTIONAL
// Display name for the project. This is what will be presented in the web UI.
// If left blank, project_name will be used.
optional string project_alias = 2;
// CONDITIONALLY REQUIRED when creating or updating projects.
// List of project owners specified by email addresses.
//
// Only project owners can create, update, or delete this project. Adding a
// new benchmark for this project without project ownership will result in a
// permission denied error. Project and benchmark owners can perform all
// other benchmark/run operations.
//
// To provide write access to a google account, supply the full email address.
// Example: [email protected]
//
// Limitations:
// * Each owner must be a legal email address
// * Max owners: 100
repeated string owner_list = 3;
// OPTIONAL
// The issue tracker that the Triage Web UI workflow will use for any
// regressions under this project.
optional IssueTrackerInfo default_issue_tracker = 4;
}
// Output for Storage.GetProjectInfo()
// NEXT_ID: 3
message ProjectInfoGetResponse {
// REQUIRED
// Response status
optional Status status = 1;
// CONDITIONALLY_REQUIRED - set when results exist
optional ProjectInfo project_info = 2;
}
// Input for Storage.QueryProjectInfo()
// NEXT_ID: 4
message ProjectInfoQuery {
// OPTIONAL
// See Querying with and without limits and cursors
optional string cursor = 1;
// OPTIONAL
// See Querying with and without limits and cursors
optional int32 limit = 2;
// COMMON
// Exact match of ProjectInfo.project_name
optional string project_name = 3;
}
// Output for Storage.QueryProjectInfo()
// NEXT_ID: 4
message ProjectInfoQueryResponse {
// REQUIRED
// Response status
optional Status status = 1;
// CONDITIONALLY_REQUIRED - set when results exist
repeated ProjectInfo project_info_list = 2;
// OPTIONAL
// See Querying with and without limits and cursors
optional string cursor = 3;
}
// -----------------------------------------------------------------------------
// Benchmark Metadata
// -----------------------------------------------------------------------------
// Contains all required information about a benchmark. This data must be
// written to Mako storage before any run data can be written.
//
// This data is normally updated infrequently. It is created once while setting
// up a new test, and updated later as-needed (e.g. adding new metrics).
//
// When first creating a benchmark, the benchmark_key field should be
// empty. The Storage server will generate and return a unique benchmark_key in
// the creation response. Save this key for future updates to the benchmark.
// It's useful to keep a text version of BenchmarkInfo (with benchmark_key set)
// in source control, so later updates are easy with the Mako command-line
// tool.
//
// NEXT_ID: 14
message BenchmarkInfo {
// CONDITIONALLY_REQUIRED: required for Update
// Uniquely identifies this benchmark, and is used as a primary key for
// BenchmarkInfo.
// This is generated by the Mako storage implementation and should
// be hard-coded in your test code or BenchmarkInfo text file.
optional string benchmark_key = 1;
// REQUIRED
// User-friendly name for your benchmark. It does not need to be unique,
// but you will probably want unique benchmark names across your project.
// This gets displayed on charts.
// This value can be changed at any time without affecting the Benchmark
// or chart dashboard links, because they reference benchmarks by key.
//
// Limitations:
// * No more than 100 characters
// * These are the only legal characters:
// * Letters (A-Z, a-z)
// * Numbers (0-9)
// * Hyphen (-)
// * Underscore (_)
// * Slash (/)
// * Dot (.)
// * Space ( )
optional string benchmark_name = 2;
// REQUIRED
// Your project name. This project name must already exist in Storage.
// See ProjectInfo.project_name for more details.
optional string project_name = 3;
// OPTIONAL
// List of benchmark owners specified by email addresses.
//
// Benchmark owners can write to this benchmark. This includes updating or
// deleting the benchmark, and uploading runs to the benchmark.
//
// See ProjectInfo.owner_list for details on how to specify email addresses.
repeated string owner_list = 4;
// REQUIRED
// Declares value information for:
// * SamplePoint.input_value fields
//
// Associated input values become x-axis values on run charts.
// This field has no effect on aggregate charts which always show
// RunInfo.timestamp_ms values on the x-axis.
//
// For common time-series test runs, where time is on the x-axis for run
// charts, ValueInfo.type should be ValueInfo.TIMESTAMP and "t" is a good
// choice for ValueInfo.value_key.
//
// For tests varying a non-time input variable during the test run,
// ValueInfo.type should be ValueInfo.NUMERIC and "x" is a good
// choice for ValueInfo.value_key.
optional ValueInfo input_value_info = 5;
// COMMON
// Declares value information for:
// * SamplePoint.metric_value_list fields
// * MetricAggregate fields
//
// Associated SamplePoint values become y-axis values on run charts.
// Associated MetricAggregate values become y-axis values on aggregate charts.
//
// Dashboard implementations will use this field to control which metrics are
// shown on the charts and the order in which the checkboxes on the aggregate,
// compare, and run charts appear.
//
// If this is not set, the custom aggregates should be set, otherwise,
// there will be nothing to chart on aggregate charts.
//
// Supply one of these for each unique key in SamplePoint and MetricAggregate
// fields that will be written during test runs.
//
// All ValueInfos supplied here will result in selectable controls on both
// run and aggregate charts. If no run data is found for a declared key, the
// control will be selectable on the chart, but no points will be plotted
// for the run. If run data contains a key that is not declared, all data
// for that key will be ignored by charts.
//
// Limitations:
// * See go/mako-storage#limits for max metric count.
repeated ValueInfo metric_info_list = 6;
// COMMON
// Declares value information for:
// * RunInfo.aggregate.run_aggregate.custom_aggregate_list
//
// Standard aggregate values for metrics are offered by Mako, but users
// may add these custom aggregate values as well. Similar to metric
// information, these fields supply necessary information about each custom
// aggregate.
//
// All ValueInfos supplied here will result in selectable controls on
// aggregate charts. If no run data is found for a declared key, the
// control will be selectable on the chart, but no points will be plotted
// for the run. If run data contains a key that is not declared, all data
// for that key will be ignored by charts.
//
// Limitations:
// * For best charting performance, use no more than 10 custom aggregates.
// * See go/mako-storage#limits for max custom aggregates count.
repeated ValueInfo custom_aggregation_info_list = 7;
// COMMON
// Detailed description of the benchmark, useful to describe things like:
// SUT
// load profile
// measurement method
// detailed metric information
// This gets displayed alongside charts.
// This info can not be part of a query.
optional string description = 8;
// UNCOMMON
// This field controls which percentiles are shown on the dashboard aggregate
// chart, and it is also used by framework aggregators to determine which
// percentiles should be computed for a run.
//
// It is a list of 1000th percentile ranks. For example, these values:
// 1000, 99000, 99900
// would declare these percentiles:
// 1st, 99th, 99.9th
//
// If this is not set, the default percentile ranks are used:
// 1000, 2000, 5000, 10000, 90000, 95000, 98000, 99000
// 1st, 2nd, 5th, 10th, 90th, 95th, 98th, 99th
//
// Limitations:
// * The list must be in ascending order.
// * No more than 15 percentiles can be chosen.
// * Values must be in range [1,99999].
repeated int32 percentile_milli_rank_list = 9;
// UNCOMMON
// This field is used to store custom, structured data that can easily
// be parsed by user-specific code. The NamedData.name field associates a
// human-readable name to data. The NamedData.data field is used to store
// user-specific, string-serialized data (e.g. simple ASCII, protobuf
// serialized ASCII, or JSON).
//
// Libraries and services that are creating and managing benchmarks
// on behalf of the lib/service users should always set this field.
// It can be used to simply verify that the benchmark is managed by the
// lib/service. It can also be used as a place for the lib/service to
// store important metadata about the managed benchmark.
// When used for this purpose, the NamedData.name field
// should contain a unique name of your lib/service. This way, multiple
// libs/services can all contain data in this list without conflict.
// For example, if a benchmark manager library is called
// 'zbench', it could set this value in the list:
// aux_data {
// name: "zbench"
// data: "v1"
// }
//
// Note that the suggestion above does not guarantee that a specific
// benchmark is managed by a certain lib/service, as any user can
// create aux_data as above. In most cases, this weak verification is
// adequate. However, if you require a strong guarantee, you could
// choose one of two options:
// 1) Persistently store managed benchmark keys
// Store all of the benchmark keys managed by your lib/service, so that
// they can be queried and verified.
// 2) Message authentication code (MAC) in data field
// Store a message authentication code (MAC) in the data for your data
// field. For example, your lib/service could use a keyed-hash message
// authentication code (HMAC) algorithm that takes the benchmark key
// (public) and a secret cryptographic key (private) as inputs:
// aux_data {
// name: "zbench"
// data: "version=v1,auth=<HMAC(benchmark_key,secret_key)>"
// }
//
// Limitations:
// * The total size of a BenchmarkInfo may be limited (See storage system
// limits), so the amount of data here should not cause that limit to be
// exceeded.
repeated NamedData aux_data = 10;
// UNCOMMON
// A Mako storage implementation may limit the total number of RunInfos
// saved on the server and perform regular cleanup of older runs.
// This could cause a problem when using golden runs for analysis if the
// golden runs get deleted once they are old. To prevent runs from getting
// deleted, apply a tag to the run and specify the tag here. All runs
// with this tag will not be automatically deleted as long as the number of
// runs with this tag does not exceed 100.
//
// Limitations:
// * If more than 100 runs have this tag applied, the runs may get deleted.
optional string retained_run_tag = 11;
// UNCOMMON
// Human readable name for what the build id represents.
// This will be used as the x-axis label when rendering aggregate history
// charts ordered by build_id in places where we we want to describe to
// a human what the build identifier represents.
// Example {build_id: 123, build_id_label: "Changelist"} -> "Changelist: 123"
optional string build_id_label = 12 [default = "Changelist"];
// UNCOMMON
// Used to generate links to get more information on the build_id for a Run of
// this Benchmark. Only used if the Run has provided a value in the build_id
// field.
// This is a printf format string which will be evaluated with a single
// parameter of the Run's build_id field value (type: int64).
optional string build_id_url_format = 13 [default = "http://cl/%d"];
}
// RunOrder defines how we will sort RunInfos.
enum RunOrder {
UNSPECIFIED = 0;
// Sort by RunInfo.timestamp_ms
TIMESTAMP = 1;
// Sort by RunInfo.build_id
BUILD_ID = 2;
}
// -----------------------------------------------------------------------------
// Run Metadata
// -----------------------------------------------------------------------------
// Annotation data for a run.
// These are displayed on the aggregate chart and are associated with a run.
// These are commonly used to identify changes that may impact the results and
// its useful to have a visual explanation. Examples:
// - SUT provisioning/code/dependency change that impacts performance
// - Benchmark load profile change
// - A bug caused a spike in performance
message RunAnnotation {
// REQUIRED
// The value_key that this annotation is associated with.
// Aggregate charts will attach the annotation to an aggregate point.
// If this is a metric key, it will be attached to the mean value.
// If this is a custom metric, it will be attached to that value.
optional string value_key = 1;
// REQUIRED
// The short flag label used on the chart, typically seen without hovering.
// This must be a single one of these characters:
// - Letters (A-Z, a-z)
// - Numbers (0-9)
optional string label = 2;
// REQUIRED
// The full description used for additional info on charts, typically seen
// once the annotation is hovered.
optional string description = 3;
}
// Contains all required information about a single test run.
// This is written twice during a test:
//
// 1) Create:
// At the start of the test, this is written with only these fields required:
// - benchmark_key
// - timestamp_ms
// The Mako storage library will create and return a run_key that
// must be used for any future updates.
//
// 2) Update:
// At the end of the test, this is written again with all relevant fields
// set. Note that the run_key (provided in Create response) must be set.
// NEXT_ID: 20
message RunInfo {
// REQUIRED
// Associates this run with a benchmark.
// Must match an existing BenchmarkInfo.benchmark_key
optional string benchmark_key = 1;
// CONDITIONALLY_REQUIRED: required for Update
// Uniquely identifies this run, and is used as a primary key for RunInfo.
// Generated by the Mako storage system.
optional string run_key = 2;
// REQUIRED
// Test run timestamp in unix time milliseconds.
// This becomes an x-axis value on aggregate charts when RunOrder is
// TIMESTAMP.
optional double timestamp_ms = 3;
// COMMON
// Test run build identifier.
// This must be a positive non-zero integer value.
// This becomes an x-axis value on the aggregate charts when RunOrder is
// BUILD_ID.
optional int64 build_id = 18;
// COMMON
// Test run duration in milliseconds.
//
// Limitations:
// * Must be >= 0.
optional double duration_time_ms = 4 [default = 0];
// COMMON
// Tags for this run.
// These tags are used to filter query results when using the storage
// library, dashboard, or analyzers.
//
// When filtering, query tags are ANDed together. A query supplying tags
// returns all runs where the query tags are a subset of the run tags.
// Each query tag must be an exact, case-sensitive match of one of the
// run tags, and they do not support regular expressions.
//
// It is conventional for tags to have the form:
// "key=value"
// Where "key" is a user-defined name for the individual tag,
// and "value" is the tag value for the particular element of data.
// However, the "=" sign is not required.
//
// A server implementation may apply "hidden tags". These tags
// all begin with underscore (_). They are not stored in the RunInfo.tags
// field, but they may be supplied in all queries involving tags.
//
// The order of tags is preserved when this proto is stored, making it
// possible to order tags such that they are easier to read the same way in
// the Mako UI. Note that this ordering does NOT affect tag querying
// behavior.
//
// Examples:
// * "env=prod"
// * "env=dev"
// * "sys-param-A=X
// * "sys-param-B=Y
// * "CL=123" (If you don't need to query by CL, store it in description)
// * "user=joe"
// * "experiment=use-datastore-instead-of-blobstore-1"
// * "experiment=use-datastore-instead-of-blobstore-2"
// * "experiment=move-filter-to-client"
//
// Limitations:
// * See the go/mako-storage#limits for max run tags.
// Never provide more than the max tags for any message. (These tags
// may be used as index keys, so they need to be limited.)
// * These are the only legal characters:
// * Letters (A-Z, a-z)
// * Numbers (0-9)
// * Hyphen (-)
// * Underscore (_) (cannot be first character)
// * Equals sign (=)
// * Period (.)
// * Colon (:)
repeated string tags = 5;
// COMMON
// Tags for this run that define what other Runs of this Benchmark are part of
// the history for this configuration of this benchmark.
//
// The set of Runs of the same benchmark that are also tagged with all values
// in historical_context_tags are comparable to this current RunInfo message
// and therefore form the "history" of this Run.
//
// Example: If the RunInfo.tags are:
// ["platform=android", "mem=16GB", "cl=1234567"]
// then it is likely that RunInfo.historical_context_tags should be:
// ["platform=android", "mem=16GB"]
//
// This field is used by Mako to provide smarter features such as
// automatically filtering historical trend lines for the current run to the
// tags in this field. Future features such as de-duplication for automated
// bug filing and reduced verbosity of Analyzers that need historical runs to
// do their regression detection will be more effective with this field
// populated.
//
// All tags in this field must also be items in the RunInfo.tags field.
// Violating this constraint is an error.
repeated string historical_context_tags = 19;
// UNCOMMON
// Defines ranges of input values that should be ignored for the purpose
// of analysis and aggregation. Ignored points are available on charts,
// but are highlighted in some way. These ignored points may be useful when
// debugging a performance issue, but not useful when evaluating
// system performance.
// The range labels may get displayed on charts.
repeated LabeledRange ignore_range_list = 6;
// CONDITIONALLY_REQUIRED: required for Update
// The associated aggregate data.
// Many of the fields found in aggregate data become y-axis values on
// aggregate charts.
optional Aggregate aggregate = 7;
// CONDITIONALLY_REQUIRED: required for run chart to show points
// When sample points and/or errors have been collected for a run, this field
// is set to the associated SampleBatch keys.
//
// If only saving aggregate data and run charts are not desired, this
// list may be empty.
//
// NOTE: Although the SampleBatch records could be queried by run_key,
// some storage implementations may have faster lookup time when
// looking up a SampleBatch by batch_key. An implementation may
// also have an eventual consistency model for queries, so having
// direct key access may be important.
//
repeated string batch_key_list = 8;
// COMMON
// Detailed description of the run. It may be useful to add info here that is
// useful for historic or debug reasons. Examples:
// * CL
// * Important SUT configuration info.
// * Important environment info.
// * Important test parameters.
//
// This is displayed alongside charts.
// This info can not be part of a query.
optional string description = 9;
// UNCOMMON
// List of annotations applied to the aggregates of this run.
// These are shown on aggregate charts.
repeated RunAnnotation annotation_list = 10;
// COMMON
// This text will be shown on the aggregate chart when a point is hovered.
// This length of this text must be relatively short, so it does not take
// up too much screen space. It is typically displayed as a single line
// of text that is truncated to fit the screen width.
optional string hover_text = 15;
// COMMON
// Test results
optional TestOutput test_output = 12;
// UNCOMMON
// Used to create links on run chart pages.
// The NamedData.name fields are used as text of <a> elements,
// and the NamedData.data fields are used as href attributes.
repeated NamedData hyperlink_list = 13;
// UNCOMMON
// This field is used to store custom, structured data that can easily
// be parsed by user-specific code. The NamedData.name field associates a
// human-readable name to data. The NamedData.data field is used to store
// user-specific, string-serialized data (e.g. simple ASCII, protobuf
// serialized ASCII, or JSON).
//
// This field is useful for storing per-run metadata about the environment
// or context of the run. Tags can also be used for this purpose, but the
// following differences are important:
// * aux_data can store more complex data than can be stored using tags.
// * aux_data cannot be used for queries.
// * While the number of tags may be limited (see the `tags` field above), the
// amount of data stored in aux_data is limited only by the RunInfo size cap
// (see below).
//
// Limitations:
// * The total size of a RunInfo may be limited, so the amount of data here
// should not cause that limit to be exceeded.
repeated NamedData aux_data = 16;
// UNCOMMON
// All runs with the same test_pass_id will be considered one Test Pass.
// These runs can come from different Projects or Benchmarks. As such, each
// Test Pass is expected to have a globally unique ID. See
// TestInput.test_pass for information about this value is set.
//
optional string test_pass_id = 17;
// FRAMEWORK_WRITE_ONLY
// Copy of TestInput.test_option_list that was initially supplied to test.
// TODO(b/20180597) Eventually will be show on run chart.
repeated TestOption test_option_list = 14;
// DEPRECATED
reserved 11;
reserved "deprecated_analyzer_results", "analyzer_results";
}
// -----------------------------------------------------------------------------
// Sample Data
// -----------------------------------------------------------------------------
// Contains all metric measurements made by a single iteration of one Sampler
// execution.
message SamplePoint {
// REQUIRED
// The single input value associated with these metric measurements.
// These values become x-axis values on run charts.
optional double input_value = 1;
// REQUIRED
// Metric measurements made.
// These values become y-axis values on run charts.
// If the values are to be charted on run charts, the value_key fields
// should be declared in BenchmarkInfo.metric_info_list.
// NOTE: KeyedValues in the list must have unique value_keys.
repeated KeyedValue metric_value_list = 2;
// UNCOMMON.
// Allows users to attach a number of annotations (e.g. links, traces,
// strings) to a SamplePoint. Annotations will be shown in the UI on run
// charts. SamplePoints with annotations will be marked with a dot that can be
// clicked on to show the contents of the annotation. These dots will appear
// for each metric present in the SamplePoint.
repeated SampleAnnotation sample_annotations_list = 3;
// UNCOMMON.
// Allows users to specify additional auxiliary data related to a SamplePoint.
// This data will be available in the Master.PreAggregation step, and will be
// stripped out before being sent to the server (will not show up in charts).
map<string, bytes> aux_data = 4;
}
// Allows users to add annotations and links to SamplePoints which are shown on
// Run charts.
//
// Annotations should be kept as small as possible as there can be many for a
// single run and the total size for all annotations is limited.
//
// Current limit is 800 KB of annotations per run. If serialized annotations in
// a run take more than 800 KB of space, the standard downsampler will randomly
// drop annotations that exceed the limit until the limit is no longer exceeded.
//
message SampleAnnotation {
// REQUIRED.
oneof annotation {
// A free-form human readable string. Should be kept short (see
// SampleAnnotation for size limits).
string text = 1;
// URL with a description. NamedData.data used as the URL and NamedData.name
// is the description.
NamedData hyperlink = 2;
}
}
// When an iteration of the Sampler execution gets an error response from the
// SUT, the Sampler may return one of these.
message SampleError {
// REQUIRED
// The single input value associated with these metric measurements.
optional double input_value = 1;
// CONDITIONALLY REQUIRED
// Short identifier of the sampler to help a human debug which Sampler hit
// the error. If a sampler_name is not supplied, the Mako framework will
// autoassign the sampler_name to be the name of the current sampler in C++,
// Python, and Java. In Go, the sampler_name must be specified.
optional string sampler_name = 2;
// REQUIRED
// Short description of error encountered.
//
// Limitations:
// * This has a max size of 1000 characters, and the framework may truncate
// it before writing to storage.
optional string error_message = 3;
}
// Measurements and SUT errors are written to storage in SampleBatches.
// Each batch contains many SamplePoints and SampleErrors.
// Upon update of a RunInfo, the RunInfo.batch_key_list is set to multiple
// SampleBatch.batch_batch_key values. This associates the run with batches
// of run data.
//
// This batching of run data allows the storage server to query multiple batches
// in parallel and to uphold potential max blob size limitations of the
// underlying storage system.
//
// Limitations:
// * The max size a batch may be limited.
// * The max number of batches per run may be limited. See the storage system
// limits.
// * All SamplePoint objects in a SampleBatch must be sorted in ascending
// order
// by input value.
message SampleBatch {
// REQUIRED
// Associates this data with a benchmark.
// Must match an existing BenchmarkInfo.benchmark_key
optional string benchmark_key = 1;
// REQUIRED
// Associates this data with a run.
// Must match an existing RunInfo.run_key
optional string run_key = 2;
// CONDITIONALLY_REQUIRED: Not required for Create.
// Uniquely identifies this batch, and is used as a primary key for
// the SampleBatch.
// Generated and returned by the Mako storage system for Create requests.
// The returned key must be found in final updates of RunInfo.batch_key_list.
optional string batch_key = 3;
// CONDITIONALLY REQUIRED: At least one SamplePoint or SampleError is
// required.
repeated SamplePoint sample_point_list = 4;
// CONDITIONALLY REQUIRED: At least one SamplePoint or SampleError is
// required.
repeated SampleError sample_error_list = 5;
}
// -----------------------------------------------------------------------------
// Aggregation of One Run's Data
// -----------------------------------------------------------------------------
// Aggregate of a single metric’s sample points. Every sample falls into one of
// three categories: usable, ignore, error. Only usable samples are an input
// to statistical aggregations.
// NEXT_ID: 10
message MetricAggregate {
// REQUIRED
// Associates this metric aggregate with a particular metric.
// If the values are to be charted on aggregate charts, the metric_key field
// should be declared in BenchmarkInfo.metric_info_list.
optional string metric_key = 1;