[Boost-bugs] [Boost C++ Libraries] #11167: auto_cpu_timer reports questionable CPU utilization

Subject: [Boost-bugs] [Boost C++ Libraries] #11167: auto_cpu_timer reports questionable CPU utilization
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-04-04 18:12:31


#11167: auto_cpu_timer reports questionable CPU utilization
------------------------------+------------------------
 Reporter: grubertm@… | Owner: bemandawes
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: timer
  Version: Boost 1.57.0 | Severity: Problem
 Keywords: |
------------------------------+------------------------
 Userspace time exceeds wall time showing >100% CPU utilization on OSX :
 0.011577s wall, 0.020000s user + 0.000000s system = 0.020000s CPU (172.8%)

 I have not seen any fractional values for userspace time, it looks like it
 can only increase in 0.01s intervals causing the incorrect print out
 above.

 -------------------------------
 #include <iostream>
 #include <vector>
 #include <boost/timer/timer.hpp>

 int main(int argc, const char * argv[]) {
     std::vector<float> hv( 1000*1000 );
     {
         boost::timer::auto_cpu_timer t;
         std::generate(hv.begin(), hv.end(), rand);
     }
     return 0;
 }

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11167>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:18 UTC