Add network option to set tracer in fdbclient
This commit is contained in:
parent
5c44d24874
commit
500eabf6dd
|
@ -1541,6 +1541,23 @@ void setNetworkOption(FDBNetworkOptions::Option option, Optional<StringRef> valu
|
|||
validateOptionValue(value, false);
|
||||
networkOptions.runLoopProfilingEnabled = true;
|
||||
break;
|
||||
case FDBNetworkOptions::CLIENT_TRACER: {
|
||||
validateOptionValue(value, true);
|
||||
std::string tracer = value.get().toString();
|
||||
if (tracer == "none" || tracer == "disabled") {
|
||||
openTracer(TracerType::DISABLED);
|
||||
} else if (tracer == "logfile" || tracer == "file" || tracer == "log_file") {
|
||||
openTracer(TracerType::LOG_FILE);
|
||||
} else if (tracer == "network_async") {
|
||||
openTracer(TracerType::NETWORK_ASYNC);
|
||||
} else if (tracer == "network_lossy") {
|
||||
openTracer(TracerType::NETWORK_LOSSY);
|
||||
} else {
|
||||
fprintf(stderr, "ERROR: Unknown or unsupported tracer: `%s'", tracer.c_str());
|
||||
throw invalid_option_value();
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -125,6 +125,9 @@ description is not currently required but encouraged.
|
|||
<Option name="client_buggify_section_fired_probability" code="83"
|
||||
paramType="Int" paramDescription="probability expressed as a percentage between 0 and 100"
|
||||
description="Set the probability of an active CLIENT_BUGGIFY section being fired. A section will only fire if it was activated" />
|
||||
<Option name="client_tracer" code="90"
|
||||
paramType="String" paramDescription="Tracer type. Choose from none, log_file, network_async, or network_lossy"
|
||||
description="Set a tracer to run on the client. Should be set to the same tracer set on the server." />
|
||||
<Option name="supported_client_versions" code="1000"
|
||||
paramType="String" paramDescription="[release version],[source version],[protocol version];..."
|
||||
description="This option is set automatically to communicate the list of supported clients to the active client."
|
||||
|
|
Loading…
Reference in New Issue