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 #32: QUICKSTEP-21 Measure execution time of...
Date Tue, 14 Jun 2016 22:15:36 GMT
Github user zuyu commented on a diff in the pull request:

    https://github.com/apache/incubator-quickstep/pull/32#discussion_r67067803
  
    --- Diff: query_execution/Worker.cpp ---
    @@ -47,13 +49,32 @@ void Worker::run() {
       }
       ClientIDMap *thread_id_map = ClientIDMap::Instance();
       thread_id_map->addValue(worker_client_id_);
    +  std::chrono::time_point<std::chrono::steady_clock> start, end;
       for (;;) {
         // Receive() is a blocking call, causing this thread to sleep until next
         // message is received.
         const AnnotatedMessage annotated_msg = bus_->Receive(worker_client_id_, 0, true);
         const TaggedMessage &tagged_message = annotated_msg.tagged_message;
         switch (tagged_message.message_type()) {
    -      case kWorkOrderMessage:  // Fall through.
    +      case kWorkOrderMessage: {
    +        WorkerMessage message(*static_cast<const WorkerMessage*>(tagged_message.message()));
    +        DCHECK(message.getWorkOrder() != nullptr);
    +        // Start measuring the execution time.
    +        start = std::chrono::steady_clock::now();
    +        message.getWorkOrder()->execute();
    +        end = std::chrono::steady_clock::now();
    +        const std::size_t query_id_for_workorder =
    +            message.getWorkOrder()->getQueryID();
    +        delete message.getWorkOrder();
    +        const uint64_t time_us =
    --- End diff --
    
    Either use `std::uint64_t`, or add `using std::uint64_t;` before the namespace.


---
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