Github user zuyu commented on a diff in the pull request:
https://github.com/apache/incubator-quickstep/pull/28#discussion_r66730358
--- Diff: cli/QuickstepCli.cpp ---
@@ -430,6 +445,13 @@ int main(int argc, char* argv[]) {
reset_parser = true;
break;
}
+#ifdef QUICKSTEP_ENABLE_GOOGLE_PROFILER
+ // Profile only if profile_file_name flag is set
+ if (!query_num && !quickstep::FLAGS_profile_file_name.empty()) {
--- End diff --
This is related to the bug we fixed above.
I mean, we should have a bool variable to indicate whether we start
profiling, and use that variable to stop profiling, instead of
https://github.com/apache/incubator-quickstep/pull/28/files#diff-451b38b1d63242a7d708a368d3c79e21R466.
```
bool use_profiler = false;
if (!query_num && !quickstep::FLAGS_profile_file_name.empty()) {
use_profiler = true;
ProfilerStart(...);
}
if (use_profiler) {
ProfilerStop();
ProfilerFlush();
}
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---