History log of /5.5.2/platform/tests/timers/ (Results 1 - 2 of 2)
Revision (<<< Hide revision tags) (Show revision tags >>>)Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
Revision tags: v6.0.3, v5.5.4, v5.5.0
27a0140910-Apr-2018 Dave Rigby <daver@couchbase.com>

MB-28941: ScopeTimer: Fix bug where start() called on temporary object

When ScopeTimer is constructed and calls start() on all listeners, it
was incorrectly calling start() on the tempor

MB-28941: ScopeTimer: Fix bug where start() called on temporary object

When ScopeTimer is constructed and calls start() on all listeners, it
was incorrectly calling start() on the temporary (moved from)
object. This caused problems when used in ep-engine, as
TracerStopwatch::start() recorded the spanId the of the selected
Span. As a consequence, when stop() was later called it still had the
default-constructed value of spanId; and hence TracerStopwatch::stop()
recorded the end time into the wrong Span.

Fix by calling start() on the non-temporary member; add testcase.

Change-Id: Id7aa6a3182aeb695c175d0ae5e92bcc1022cc5b9
Reviewed-on: http://review.couchbase.org/92513
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Paolo Cocchi <paolo.cocchi@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>

show more ...

9c83cef106-Apr-2018 Dave Rigby <daver@couchbase.com>

MB-28941: Add ScopeTimer classes for timing to multiple listeners

Add ScopeTimer classes: these are timer wrappers which provides a
RAII-style mechanism for timing the duration of sectio

MB-28941: Add ScopeTimer classes for timing to multiple listeners

Add ScopeTimer classes: these are timer wrappers which provides a
RAII-style mechanism for timing the duration of sections of code;
where multiple listeners can record the same duration.

The motiviation for this class is we have regions of code which
multiple listeners want to time - for example the main KV-Engine
functions want to record their duratin in a per-bucket histogram, and
also into the per-Cookie Tracer timings. We don't want to just have
each listener perform it's reading of the clock as that is (a) costly
and (b) gives slightly different time values to each
listener. Instead, this class handles reading the time (just once at
start and stop); and then passes it onto each listener.

Change-Id: I50f87a99ce74fadb61931f1b44011e42207c5020
Reviewed-on: http://review.couchbase.org/92322
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>

show more ...