perfetto-protos
Version:
Perfetto protos exposed via protobuf-es for browser and node
173 lines (150 loc) • 6.48 kB
text/typescript
//
// Copyright (C) 2017 The Android Open Source Project
//
// 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
//
// http://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.
// @generated by protoc-gen-es v2.2.2 with parameter "target=ts"
// @generated from file protos/perfetto/config/stress_test_config.proto (package perfetto.protos, syntax proto2)
/* eslint-disable */
import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1";
import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1";
import type { TraceConfig } from "./trace_config_pb";
import { file_protos_perfetto_config_trace_config } from "./trace_config_pb";
import type { Message } from "@bufbuild/protobuf";
/**
* Describes the file protos/perfetto/config/stress_test_config.proto.
*/
export const file_protos_perfetto_config_stress_test_config: GenFile = /*@__PURE__*/
fileDesc("Ci9wcm90b3MvcGVyZmV0dG8vY29uZmlnL3N0cmVzc190ZXN0X2NvbmZpZy5wcm90bxIPcGVyZmV0dG8ucHJvdG9zIpkEChBTdHJlc3NUZXN0Q29uZmlnEjIKDHRyYWNlX2NvbmZpZxgBIAEoCzIcLnBlcmZldHRvLnByb3Rvcy5UcmFjZUNvbmZpZxIVCg1zaG1lbV9zaXplX2tiGAIgASgNEhoKEnNobWVtX3BhZ2Vfc2l6ZV9rYhgDIAEoDRIVCg1udW1fcHJvY2Vzc2VzGAQgASgNEhMKC251bV90aHJlYWRzGAUgASgNEhIKCm1heF9ldmVudHMYBiABKA0SDwoHbmVzdGluZxgHIAEoDRJMChRzdGVhZHlfc3RhdGVfdGltaW5ncxgIIAEoCzIuLnBlcmZldHRvLnByb3Rvcy5TdHJlc3NUZXN0Q29uZmlnLldyaXRlclRpbWluZxIXCg9idXJzdF9wZXJpb2RfbXMYCSABKA0SGQoRYnVyc3RfZHVyYXRpb25fbXMYCiABKA0SRQoNYnVyc3RfdGltaW5ncxgLIAEoCzIuLnBlcmZldHRvLnByb3Rvcy5TdHJlc3NUZXN0Q29uZmlnLldyaXRlclRpbWluZxqDAQoMV3JpdGVyVGltaW5nEhQKDHBheWxvYWRfbWVhbhgBIAEoARIWCg5wYXlsb2FkX3N0ZGRldhgCIAEoARIRCglyYXRlX21lYW4YAyABKAESEwoLcmF0ZV9zdGRkZXYYBCABKAESHQoVcGF5bG9hZF93cml0ZV90aW1lX21zGAUgASgN", [file_protos_perfetto_config_trace_config]);
/**
* This is the schema for the config files in /test/stress_test/configs/*.cfg.
*
* @generated from message perfetto.protos.StressTestConfig
*/
export type StressTestConfig = Message<"perfetto.protos.StressTestConfig"> & {
/**
* @generated from field: optional perfetto.protos.TraceConfig trace_config = 1;
*/
traceConfig?: TraceConfig;
/**
* Shared Memory Buffer setup, passed as arguments to Tracing.Initialize().
*
* @generated from field: optional uint32 shmem_size_kb = 2;
*/
shmemSizeKb: number;
/**
* @generated from field: optional uint32 shmem_page_size_kb = 3;
*/
shmemPageSizeKb: number;
/**
* How many producer processes to spawn.
*
* @generated from field: optional uint32 num_processes = 4;
*/
numProcesses: number;
/**
* How many writer threads each producer process should spawn.
*
* @generated from field: optional uint32 num_threads = 5;
*/
numThreads: number;
/**
* The producer will write events until one of the following is met:
* - trace_config.duration_ms is reached.
* - max_events is reached.
*
* @generated from field: optional uint32 max_events = 6;
*/
maxEvents: number;
/**
* If > 0 will write nested messages up to N levels deep. The size of each
* nested message depends on the payload_mean / sttdev arguments (below).
* This is to cover the patching logic.
*
* @generated from field: optional uint32 nesting = 7;
*/
nesting: number;
/**
* The timings used by default.
*
* @generated from field: optional perfetto.protos.StressTestConfig.WriterTiming steady_state_timings = 8;
*/
steadyStateTimings?: StressTestConfig_WriterTiming;
/**
* Optionally it is possible to cause a writer to enter "burst mode",
* simulating peaks of high-intensity writing. The way it works is the
* following: by default the writer writes events using the
* |steady_state_timings|. Then every |burst_period_ms| it will switch to the
* |burst_timings| for |burst_duration_ms|, and go back to the steady state
* after that (and then repeat).
*
* @generated from field: optional uint32 burst_period_ms = 9;
*/
burstPeriodMs: number;
/**
* @generated from field: optional uint32 burst_duration_ms = 10;
*/
burstDurationMs: number;
/**
* @generated from field: optional perfetto.protos.StressTestConfig.WriterTiming burst_timings = 11;
*/
burstTimings?: StressTestConfig_WriterTiming;
};
/**
* Describes the message perfetto.protos.StressTestConfig.
* Use `create(StressTestConfigSchema)` to create a new message.
*/
export const StressTestConfigSchema: GenMessage<StressTestConfig> = /*@__PURE__*/
messageDesc(file_protos_perfetto_config_stress_test_config, 0);
/**
* This submessage defines the timings of each writer worker thread.
*
* @generated from message perfetto.protos.StressTestConfig.WriterTiming
*/
export type StressTestConfig_WriterTiming = Message<"perfetto.protos.StressTestConfig.WriterTiming"> & {
/**
* The size of the payload written on each iteration.
*
* @generated from field: optional double payload_mean = 1;
*/
payloadMean: number;
/**
* @generated from field: optional double payload_stddev = 2;
*/
payloadStddev: number;
/**
* The nominal event writing rate, expressed in events/sec.
* E.g. if payload_mean = 500 (bytes) and rate_mean = 1000 (Hz), each thread
* will write 500 KB / sec approximately (% stalling).
*
* @generated from field: optional double rate_mean = 3;
*/
rateMean: number;
/**
* @generated from field: optional double rate_stddev = 4;
*/
rateStddev: number;
/**
* If non-zero each worker will slow down the writing of the payload:
* it writes half payload, sleep for payload_write_time_ms, then write the
* other half.
*
* @generated from field: optional uint32 payload_write_time_ms = 5;
*/
payloadWriteTimeMs: number;
};
/**
* Describes the message perfetto.protos.StressTestConfig.WriterTiming.
* Use `create(StressTestConfig_WriterTimingSchema)` to create a new message.
*/
export const StressTestConfig_WriterTimingSchema: GenMessage<StressTestConfig_WriterTiming> = /*@__PURE__*/
messageDesc(file_protos_perfetto_config_stress_test_config, 0, 0);