quickstep-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From navsan <...@git.apache.org>
Subject [GitHub] incubator-quickstep pull request #28: Add option to enable Google Profiler.
Date Mon, 13 Jun 2016 05:11:26 GMT
Github user navsan commented on a diff in the pull request:

    https://github.com/apache/incubator-quickstep/pull/28#discussion_r66740805
  
    --- 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 (!started_profiling && !quickstep::FLAGS_profile_file_name.empty())
{
    --- End diff --
    
    Good question. It’s because, unless you’ve preloaded the buffer pool (not always a
good idea), the first run of the query results in disk I/O and other overhead that significantly
skews the profiling results. It’s the same reason we don’t include the first run time
in our benchmarking: when profiling query execution, it makes more sense to get numbers using
a warm buffer pool and warm caches. This is not *always* the right thing to do: it’s obviously
wrong for profiling the TextScan operator. In those cases, you might want to put in your own
Profiler probes (just follow the start/stop pattern used in this PR) or just run quickstep
with the CPUPROFILE environment variable set (as per gperftools documentation) to get the
full profile for the entire execution. 
    
    I’ve provided the explanation in the flag definition, CMake comments as well as in the
PR header comment. 
    
    
    > On Jun 12, 2016, at 22:49, Zuyu ZHANG <notifications@github.com> wrote:
    > 
    > In cli/QuickstepCli.cpp <https://github.com/apache/incubator-quickstep/pull/28#discussion_r66737198>:
    > 
    > > @@ -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 (!started_profiling && !quickstep::FLAGS_profile_file_name.empty())
{
    > Now we are using the singleton design pattern.
    > 
    > I still have a question: why we start profiling after one query finishes execution,
instead of before any query starts? Thanks!
    > 
    > —
    > You are receiving this because you were mentioned.
    > Reply to this email directly, view it on GitHub <https://github.com/apache/incubator-quickstep/pull/28/files/00955f19652fe54468377e932365d77a13cc69c8#r66737198>,
or mute the thread <https://github.com/notifications/unsubscribe/ACZB62yfZt1S-zIV8u5HZq-Dryl6gVHLks5qLNNHgaJpZM4Iz4mC>.
    > 
    



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message