szaszm commented on a change in pull request #741: MINIFICPP-1139 Implemented.
URL: https://github.com/apache/nifi-minifi-cpp/pull/741#discussion_r385725765
 
 

 ##########
 File path: extensions/windows-event-log/ConsumeWindowsEventLog.cpp
 ##########
 @@ -271,18 +280,83 @@ void ConsumeWindowsEventLog::onTrigger(const 
std::shared_ptr<core::ProcessContex
     return;
   }
 
-  const auto flowFileCount = processQueue(session);
+  const auto commitAndSaveBookmark = [&] (const std::wstring& bookmarkXml){
+    const auto before_commit = std::chrono::steady_clock::now();
+    session->commit();
+    logger_->log_debug("processQueue commit took %llu ms",
+                       
std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now()
 - before_commit).count());
 
 Review comment:
   There's already a thread about `%llu`, but this case is somewhat different. 
Here, the standard doesn't specify the returned type, but it specifies the 
minimum number of bits.
   I suggest assigning the result of `milliseconds::count` to a `uint64_t` 
(where it will definitely fit), then printing it as a normal `uint64_t`, i.e. 
with the `"%" PRIu64` format specifier
   
   (In both cases)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to