|
Boost Users : |
Subject: [Boost-users] [chrono] v0.3.2 New frequency, lifetime and percentage stopwatch_accumulator features
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2010-01-25 19:05:20
Hi,
I have update the Boost.Chrono library with some minor features, a lot of bug fixes, and started the tutorial with some examples of features interesting people since the last version.
New Features:
* Added overloading for operator/(Integer/Duration) (used to get the frequency)
* Added frequency, lifetime and percentage to the stopwatch_accumulator. The default format is "%c times, sum%ss, min%ms, max%Ms, mean%as, frequency%fherzs, lifetime%ls, percentage=%p%\n", where
%c : the counter of the number of times the pair start/stop has been called.
%s : the sum of the samples of elapsed time between the call to start/stop.
%m : the min of the samples of elapsed time between the call to start/stop.
%M : the max of the samples of elapsed time between the call to start/stop.
%a : the mean of the samples of elapsed time between the call to start/stop.
%f : the frequency of calls to start.
%l : the lifetime of the stopwatch_accumulator.
%p : the percentage of time spent by this stopwatch respect to its lifetime.
Bug Fixes
* Specific formatters didn't work completly
* Replace duration(0) by duration::zero() on template classes.
* suspend didn't work: partial_ not initialized neither taken in account by the elapsed function.
The library can be downloaded from http://www.boostpro.com/vault/index.php?action=downloadfile&filename=chrono.zip&directory=System& and the documentation is online on the sandbox http://svn.boost.org/svn/boost/sandbox/chrono/libs/chrono/doc/html/index.html. SVN repository http://svn.boost.org/svn/boost/sandbox/chrono.
I would like to thanks particularly Andrew Chinkoff for his suggestion of the frequency feature and all those that have tried the library and reported the bugs they found, either on this ML or personally. I would really appreciate if people having the possibility to test on other platforms/compilers report me how the library works.
As you can see the library is already on the review schedule, waiting for a review manager and a date for the review. I expect to add yet some features for the review release as thread clocks, and suspensible clocks i.e. clocks that can be suspended/resumed. Any idea for better naming the concepts/classes is welcome.
Hoping this release works better for you,
Vicente
(See below the contents of preceding releases)
----- Original Message -----
From: "vicente.botet" <vicente.botet_at_[hidden]>
To: <boost-users_at_[hidden]>; <boost_at_[hidden]>
Sent: Wednesday, January 20, 2010 11:02 PM
Subject: [chrono] v0.3.1 Support for wide characters
Hi,
this new version includes:
* Added support for wide characters on formatters.
* Added chrono.hpp and stopwatches.hpp header files at the boost level.
* Update of the doc taking care of preceding comments.
Comments are welcome :)
Best,
Vicente
----- Original Message -----
From: "vicente.botet" <vicente.botet_at_[hidden]>
To: <boost_at_[hidden]>; <boost-users_at_[hidden]>
Sent: Sunday, January 17, 2010 9:14 PM
Subject: [chrono] v0.3 New Stopwatch Feature
Hi,
I'm pleased to announce the new version of the Boost.Chrono library. The implementaton is quite stable; the new interface could suffer of some modifications, renaming, ... as far as you submit some proposals. I would request a formal review soon and I will need a review manager. I know that review managers are hard to find, so if you are interested in the library, please the Review Wizards.
The library can be downloaded from http://www.boostpro.com/vault/index.php?action=downloadfile&filename=chrono.zip&directory=System& and the documentation is online on the sandbox http://svn.boost.org/svn/boost/sandbox/chrono/libs/chrono/doc/html/index.html.
I've tested it with gcc and MSVC. Previoous version of the library have been testted on Mac, but I'm not able to test this platform. Could someone check if there are some regressions on Mac?
New Features:
* Process cpu clocks
* Independent process cpu clocks for real, user, system process CPU time
* Global process cpu clock for real, user, system process CPU time
* Stopwatch concept measuring elapsed time between different points in time associated to the operations start, stop, suspend and resume.
* stopwatch is a model Stopwatch measuring the elapsed time between the start and the stop operations.
* stopwatch_accumulator is a model Stopwatch allowing to accumulate several time samples and give the average, ...
* Scoped helper classes allowing to pairwise start/stop operations, suspend/resume and resume/suspend a Stopwatch.
* Stopwatch Formatter concept
* stopwatch formatter "%ds\n"
* stopwatch accumulator formatter "%c times, sum%ss, min%ms, max%Ms, mean%as\n"
* time formatter "real %rs, cpu %cs (%p%), user %us, system %ss\n"
* digital_time decomposition class separating days, hours,minutes,seconds, nanoseconds from any duration class (looking for a better name)
* digital_time formatter "%d days(s) %h:%m:%s.%n\n"
* stopwatch_reporter is a convenient generic class reporting elapsed time for the Stopwatch concept.
* stopclock<Clock> shortcut stopwatch_reporter<stopwatch<Clcok>>
* typeof registration for classes duration and time_point
Depreceated Features:
* The classes process_times, process_clock, process_timer, timer and run_timer are now deprecated as the preceding additions are more generic. However for backward compatibility they are preserved until inclusion of the library in Boost. Next follows the equivalences:
timer<> ~ stopwatch<>
process_timer ~ stopwatch<process_cpu_clock>
run_timer ~ stopclock<>
Bug Fixes
* Try to correct warning C4251: 'boost::chrono::run_timer::m_format' : class 'std::basic_string<_Elem,_Traits,_Ax>' needs to have dll-interface to be used by clients of class 'boost::chrono::run_timer', by don't including inlines functions using the std::string m_format.
For people that doesn't know it yet, Boost.Chrono library provides:
* The C++0x Standard Library's common_type.
* The C++0x Standard Library's compile-time rational arithmetic.
* The C++0x Standard Library's time utilities, including:
* Class template duration
* Class template time_point
* Clocks:
* system_clock
* monotonic_clock
* high_resolution_clock
* typeof registration for classes duration and time_point
* Process clocks:
* process_real_CPU_clocks, capturing real-CPU times.
* process_user_CPU_clocks, capturing user-CPU times.
* process_system_CPU_clocks, capturing system-CPU times.
* process_cpu_clock, tuple-like class capturing at once real, user-CPU, and system-CPU times.
* Stopwatches:
* stopwatch, capturing elapsed Clock times.
* stopwatch_accumulator, capturing cummulated elapsed Clock times.
* scoped helper classes allowing to pairwise start/stop operations, suspend/resume and resume/suspend a Stopwatch.
* Stopclocks or Stopwatch reporters:
* stopwatch_reporter, convenient reporting of models of Stopwatch results.
* stopclock<Clock> shortcut of stopwatch_reporter<stopwatch<Clock>>
Best regards,
_____________________
Vicente Juan Botet Escribá
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net