Boost logo

Boost :

Subject: Re: [boost] [stopwatches] About reducing the scope of the library
From: Gordon Woodhull (gordon_at_[hidden])
Date: 2011-09-10 04:02:19


On Sep 9, 2011, at 3:10 PM, "Vicente J. Botet Escriba" <vicente.botet_at_[hidden]> wrote:

> Le 08/09/11 04:30, Gordon Woodhull a écrit :
>>
>> On Sep 7, 2011, at 5:35 PM, "Vicente J. Botet Escriba"<vicente.botet_at_[hidden]> wrote:
>>
>>> Do you think that it is worth proposing an addition to Boost.Chrono that provides only stopwatches (without reporting)?
>> It would be really nice to have a replacement for Boost.Timer ASAP. Perhaps it would make sense to introduce something simple as a Chrono example, and then decide how to expand it into a library later?
> I don't know what do you consider a simple example.

Oops, I meant: yes please make stopwatches a sublibrary of chrono and then see if it needs to set off on its own.

All I want is a replacement for boost::timer, for writing benchmarks. I never used the progress_timer so I don't know about the reporting side of Boost.Timer, never wanted it. I want a simple class that keeps track of elapsed time so I don't have to even do one subtraction.

In one quick pass of the Stopwatches documentation, I can't find anything that doesn't do automatic reporting. I figure there must be a class in there that looks a lot like boost::timer or the one in Chrono's "key is struck" example, which is what your original question must be proposing.

I find Boost.Timer kind of buggy. It was reporting CPU time on Linux, so I couldn't benchmark a parallelized program. I feel it has other problems. I thought Chrono was supposed to replace it, but it's still a little verbose for this very simple task.

Cheers,
Gordon


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk