Opened 8 years ago

#11167 new Bugs

auto_cpu_timer reports questionable CPU utilization

Reported by: grubertm@… Owned by: Beman Dawes
Milestone: To Be Determined Component: timer
Version: Boost 1.57.0 Severity: Problem
Keywords: Cc:

Description

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;

}

Change History (0)

Note: See TracTickets for help on using tickets.