Merge pull request #4349 from sfc-gh-ljoswiak/fixes/log-file-tracing

Stop running log file tracer in simulation
This commit is contained in:
Markus Pilman 2021-03-02 14:00:00 -07:00 committed by GitHub
commit a03b5f5426
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -1649,7 +1649,7 @@ int main(int argc, char* argv[]) {
//startOldSimulator();
startNewSimulator();
openTraceFile(NetworkAddress(), opts.rollsize, opts.maxLogsSize, opts.logFolder, "trace", opts.logGroup);
openTracer(TracerType(deterministicRandom()->randomInt(static_cast<int>(TracerType::DISABLED), static_cast<int>(TracerType::END))));
openTracer(TracerType(deterministicRandom()->randomInt(static_cast<int>(TracerType::DISABLED), static_cast<int>(TracerType::SIM_END))));
} else {
g_network = newNet2(opts.tlsConfig, opts.useThreadPool, true);
g_network->addStopCallback( Net2FileSystem::stop );

View File

@ -365,7 +365,7 @@ void openTracer(TracerType type) {
g_tracer = new FastUDPTracer{};
#endif
break;
case TracerType::END:
case TracerType::SIM_END:
ASSERT(false);
break;
}

View File

@ -97,9 +97,9 @@ struct Span {
// values in this enum can change without notice.
enum class TracerType {
DISABLED = 0,
LOG_FILE = 1,
NETWORK_LOSSY = 2,
END = 3
NETWORK_LOSSY = 1,
SIM_END = 2, // Any tracers that come after SIM_END will not be tested in simulation
LOG_FILE = 3
};
struct ITracer {