package profiling
- Alphabetic
- Public
- Protected
Type Members
- class AnyRefSet extends AnyRef
A set of AnyRefs, based on object equality.
- class ProfilerSummaryTree extends AnyRef
A node in a tree summarising profiling information, giving information about all method calls that have been reached by the same path of method calls.
- class SamplingProfiler extends AnyRef
A sampling profiler.
Value Members
- object MemoryProfiler
- object Profiler
The object implements a number of named timers and named counters.
The object implements a number of named timers and named counters. Code can be timed, with the time taken added to that of the named timer. Similarly, the number of times particular points in the code are reached can be counted, with the count recorded against a named counter.
The normal usages are:
Profiler.time("timer-name"){ code }
, which timescode
, recording the time against timertimer-name
, and returns the result ofcode
;Profiler.count("counter-name")
, which adds one onto countercounter-name
;Profiler.report
which gives a summary of the profiling.
Note that normal scoping rules apply. In code such as
Profiler.time("answer"){ val x = 6*7 }
, the scope ofx
will be just the inner statement; normal use would beval x = Profiler.time("answer"){ 6*7 }
.For use with concurrent code, it is recommended to start by calling
setWorkers(p)
to set the number of concurrent threads top
(8 by default). If two threads have the same ID (modp
) then they may interfere, both in terms of correctness, and through creating cache contention.As with all profilers, there is a fairly significant overhead.
- object ProfilerSummaryTree
- object SamplingProfiler
- object ThreadID
An object providing thread identifiers.
An object providing thread identifiers. Based on Herlihy & Shavit, Section A.2.4