quickstep-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zuyu <...@git.apache.org>
Subject [GitHub] incubator-quickstep pull request #36: QUICKSTEP-24 Report generation support...
Date Fri, 17 Jun 2016 05:14:23 GMT
Github user zuyu commented on a diff in the pull request:

    --- Diff: query_execution/Foreman.cpp ---
    @@ -229,4 +229,22 @@ void Foreman::sendWorkerMessage(const size_t worker_thread_index,
           << worker_directory_->getClientID(worker_thread_index);
    +void Foreman::printWorkOrderProfilingResults(std::FILE *out) const {
    +  const std::vector<
    +      std::tuple<std::size_t, std::size_t, std::size_t, std::size_t>>
    +      &recorded_times = policy_enforcer_->getProfilingResults();
    +  fputs("Worker ID, NUMA Socket, Query ID, Operator ID, Time (microseconds)\n", out);
    +  for (auto workorder_entry : recorded_times) {
    +    // Note: Index of the "worker thread index" in the tuple is 0.
    +    const std::size_t worker_id = std::get<0>(workorder_entry);
    +    fprintf(out, "%lu,", worker_id);
    +    fprintf(out, "%d,", worker_directory_->getNUMANode(worker_id));
    +    fprintf(out, "%lu,", std::get<1>(workorder_entry));
    +    fprintf(out, "%lu,", std::get<2>(workorder_entry));
    +    fprintf(out, "%lu\n", std::get<3>(workorder_entry));
    --- End diff --
    How about merging these `fprintf`s into one?
    Although this is not in a critical path, we still save tons of system calls.

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.

View raw message