if (event.isStart()) {
decoratorsProfiler = new DecoratorsProfiler();
currentModuleProfiling = new ModuleProfiling(module, clock);
- }
- else {
+ } else {
currentModuleProfiling.stop();
modulesProfilings.put(module, currentModuleProfiling);
long moduleTotalTime = currentModuleProfiling.totalTime();
public void onSensorsPhase(SensorsPhaseEvent event) {
if (event.isStart()) {
currentModuleProfiling.addPhaseProfiling(Phases.Phase.SENSOR);
- }
- else {
+ } else {
currentModuleProfiling.getProfilingPerPhase(Phases.Phase.SENSOR).stop();
}
}
public void onDecoratorsPhase(DecoratorsPhaseEvent event) {
if (event.isStart()) {
currentModuleProfiling.addPhaseProfiling(Phases.Phase.DECORATOR);
- }
- else {
+ } else {
for (Decorator decorator : decoratorsProfiler.getDurations().keySet()) {
currentModuleProfiling.getProfilingPerPhase(Phases.Phase.DECORATOR)
.getProfilingPerItem(decorator).setTotalTime(decoratorsProfiler.getDurations().get(decorator));
public void onPostJobsPhase(PostJobsPhaseEvent event) {
if (event.isStart()) {
currentModuleProfiling.addPhaseProfiling(Phases.Phase.POSTJOB);
- }
- else {
+ } else {
currentModuleProfiling.getProfilingPerPhase(Phases.Phase.POSTJOB).stop();
}
}
public void onMavenPhase(MavenPhaseEvent event) {
if (event.isStart()) {
currentModuleProfiling.addPhaseProfiling(Phases.Phase.MAVEN);
- }
- else {
+ } else {
currentModuleProfiling.getProfilingPerPhase(Phases.Phase.MAVEN).stop();
}
}
}
class DecoratorsProfiler {
- List<Decorator> decorators = Lists.newArrayList();
- Map<Decorator, Long> durations = new IdentityHashMap<Decorator, Long>();
- long startTime;
- Decorator currentDecorator;
+ private List<Decorator> decorators = Lists.newArrayList();
+ private Map<Decorator, Long> durations = new IdentityHashMap<Decorator, Long>();
+ private long startTime;
+ private Decorator currentDecorator;
DecoratorsProfiler() {
}
public class PurgeProfiler {
- Map<String, Long> durations = new HashMap<String, Long>();
- long startTime;
- String currentTable;
+ private Map<String, Long> durations = new HashMap<String, Long>();
+ private long startTime;
+ private String currentTable;
private final Clock clock;
public PurgeProfiler() {
for (Entry<String, Long> item : sortedFullList) {
if (i++ >= maxSize || item.getValue() == 0) {
return result;
- }
- else {
+ } else {
result.add(item);
}
}