Add DistributedTracerClient enum to mako. (#7297)
This commit is contained in:
parent
46e69fbe09
commit
5a4082bfe8
|
@ -678,10 +678,10 @@ int workerProcessMain(Arguments const& args, int worker_id, shared_memory::Acces
|
|||
|
||||
/* enable distributed tracing */
|
||||
switch (args.distributed_tracer_client) {
|
||||
case 1:
|
||||
case DistributedTracerClient::NETWORK_LOSSY:
|
||||
err = network::setOptionNothrow(FDB_NET_OPTION_DISTRIBUTED_CLIENT_TRACER, BytesRef(toBytePtr("network_lossy")));
|
||||
break;
|
||||
case 2:
|
||||
case DistributedTracerClient::LOG_FILE:
|
||||
err = network::setOptionNothrow(FDB_NET_OPTION_DISTRIBUTED_CLIENT_TRACER, BytesRef(toBytePtr("log_file")));
|
||||
break;
|
||||
}
|
||||
|
@ -1344,11 +1344,11 @@ int parseArguments(int argc, char* argv[], Arguments& args) {
|
|||
break;
|
||||
case ARG_DISTRIBUTED_TRACER_CLIENT:
|
||||
if (strcmp(optarg, "disabled") == 0) {
|
||||
args.distributed_tracer_client = 0;
|
||||
args.distributed_tracer_client = DistributedTracerClient::DISABLED;
|
||||
} else if (strcmp(optarg, "network_lossy") == 0) {
|
||||
args.distributed_tracer_client = 1;
|
||||
args.distributed_tracer_client = DistributedTracerClient::NETWORK_LOSSY;
|
||||
} else if (strcmp(optarg, "log_file") == 0) {
|
||||
args.distributed_tracer_client = 2;
|
||||
args.distributed_tracer_client = DistributedTracerClient::LOG_FILE;
|
||||
} else {
|
||||
args.distributed_tracer_client = -1;
|
||||
}
|
||||
|
|
|
@ -106,6 +106,8 @@ enum OpKind {
|
|||
|
||||
enum TPSChangeTypes { TPS_SIN, TPS_SQUARE, TPS_PULSE };
|
||||
|
||||
enum DistributedTracerClient { DISABLED, NETWORK_LOSSY, LOG_FILE };
|
||||
|
||||
/* we set WorkloadSpec and Arguments only once in the master process,
|
||||
* and won't be touched by child processes.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue