From a85fff03923c979e0ac9cfb637b19abe9c8bb2f9 Mon Sep 17 00:00:00 2001 From: Hyunjae Woo Date: Mon, 31 Jul 2023 23:01:46 -0700 Subject: [PATCH] Set to default value when specified --- src/c++/perf_analyzer/command_line_parser.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/c++/perf_analyzer/command_line_parser.cc b/src/c++/perf_analyzer/command_line_parser.cc index fd19a181e..2e8a9fc62 100644 --- a/src/c++/perf_analyzer/command_line_parser.cc +++ b/src/c++/perf_analyzer/command_line_parser.cc @@ -922,7 +922,10 @@ CLParser::ParseCommandLine(int argc, char** argv) case 8: case 'l': { std::string latency_threshold_ms{optarg}; - if (std::stoi(latency_threshold_ms) >= 0) { + if (std::stoi(latency_threshold_ms) == 0) { + params_->latency_threshold_ms = NO_LIMIT; + } + if (std::stoi(latency_threshold_ms) > 0) { params_->latency_threshold_ms = std::stoi(latency_threshold_ms); } else { Usage(