EMMA Coverage Report (generated Sun Aug 17 11:20:34 PDT 2014)
[all classes][net.digitaltsunami.tmeter.level]

COVERAGE SUMMARY FOR SOURCE FILE [TimerThreshold.java]

nameclass, %method, %block, %line, %
TimerThreshold.java100% (1/1)100% (8/8)100% (90/90)100% (11/11)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class TimerThreshold100% (1/1)100% (8/8)100% (90/90)100% (11/11)
<static initializer> 100% (1/1)100% (34/34)100% (4/4)
TimerThreshold (String, int): void 100% (1/1)100% (5/5)100% (1/1)
getGroup (): Object 100% (1/1)100% (3/3)100% (1/1)
getLevelType (): TimerLevelType 100% (1/1)100% (2/2)100% (1/1)
isEnabled (TimerLevel []): boolean 100% (1/1)100% (24/24)100% (4/4)
isEnabled (TimerLevel): boolean 100% (1/1)100% (13/13)100% (1/1)
valueOf (String): TimerThreshold 100% (1/1)100% (5/5)100% (1/1)
values (): TimerThreshold [] 100% (1/1)100% (4/4)100% (1/1)

1package net.digitaltsunami.tmeter.level;
2 
3/**
4 * Basic threshold timer level providing three levels of granularity:
5 * <ul>
6 * <li>COURSE: Record timers at a high level. For example, recording only major
7 * tasks like Add Account.
8 * <li>MEDIUM: Record timers at a more detailed level. For example, recording
9 * sub-tasks with Add Account: Validate, Insert, Prepare Response.
10 * <li>FINE: Record timers at a detail level. For example, recording all
11 * sub-tasks within Validate Account: Validate User, Validate Address, etc.
12 * </ul>
13 * 
14 * @author dhagberg
15 * 
16 */
17public enum TimerThreshold implements TimerLevel {
18    /**
19     * Course grained timer level. If filter set at this level, only timers with
20     * this level will be recorded.
21     */
22    COURSE,
23    /**
24     * Medium grained timer level. If filter set at this level, timers with this
25     * level and above will be recorded.
26     */
27    MEDIUM,
28    /**
29     * Fine grained timer level. If filter set at this level, all timers with a
30     * {@link TimerThreshold} timer level will be recorded.
31     */
32    FINE;
33 
34    @Override
35    public boolean isEnabled(TimerLevel level) {
36        return (level instanceof TimerThreshold && this.ordinal() >= ((TimerThreshold) level).ordinal());
37    }
38 
39    @Override
40    public boolean isEnabled(TimerLevel... levels) {
41        for (TimerLevel level : levels) {
42            if (isEnabled(level)) {
43                return true;
44            }
45        }
46        return false;
47    }
48 
49    @Override
50    public TimerLevelType getLevelType() {
51        return TimerLevelType.THRESHOLD;
52    }
53 
54    @Override
55    public Object getGroup() {
56        return this.getClass();
57    }
58 
59}

[all classes][net.digitaltsunami.tmeter.level]
EMMA 2.1.5320 (stable) (C) Vladimir Roubtsov