1/*
2 * Copyright (C) 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = "proto2";
18
19package perfetto.protos;
20
21// The configuration for a fake producer used in tests.
22message TestConfig {
23  message DummyFields {
24    optional uint32 field_uint32 = 1;
25    optional int32 field_int32 = 2;
26    optional uint64 field_uint64 = 3;
27    optional int64 field_int64 = 4;
28    optional fixed64 field_fixed64 = 5;
29    optional sfixed64 field_sfixed64 = 6;
30    optional fixed32 field_fixed32 = 7;
31    optional sfixed32 field_sfixed32 = 8;
32    optional double field_double = 9;
33    optional float field_float = 10;
34    optional sint64 field_sint64 = 11;
35    optional sint32 field_sint32 = 12;
36    optional string field_string = 13;
37    optional bytes field_bytes = 14;
38  }
39
40  // The number of messages the fake producer should send.
41  optional uint32 message_count = 1;
42
43  // The maximum number of messages which should be sent each second.
44  // The actual obserced speed may be lower if the producer is unable to
45  // work fast enough.
46  // If this is zero or unset, the producer will send as fast as possible.
47  optional uint32 max_messages_per_second = 2;
48
49  // The seed value for a simple multiplicative congruential pseudo-random
50  // number sequence.
51  optional uint32 seed = 3;
52
53  // The size of each message in bytes. Should be greater than or equal 5 to
54  // account for the number of bytes needed to encode the random number and a
55  // null byte for the string.
56  optional uint32 message_size = 4;
57
58  // Whether the producer should send a event batch when the data source is
59  // is initially registered.
60  optional bool send_batch_on_register = 5;
61
62  optional DummyFields dummy_fields = 6;
63}
64