private void mavenPhase(PhasesSumUpTimeProfiler profiler) throws InterruptedException { // Start of maven phase profiler.onMavenPhase(mavenEvent(true)); clock.sleep(4); // End of maven phase profiler.onMavenPhase(mavenEvent(false)); }
private void batchStep(PhasesSumUpTimeProfiler profiler) throws InterruptedException { // Start of batch step profiler.onBatchStep(new BatchStepEvent("Free memory", true)); clock.sleep(9); // End of batch step profiler.onBatchStep(new BatchStepEvent("Free memory", false)); }
private void decoratorPhase(PhasesSumUpTimeProfiler profiler) throws InterruptedException { Decorator decorator1 = new FakeDecorator1(); Decorator decorator2 = new FakeDecorator2(); // Start of decorator phase profiler.onDecoratorsPhase(decoratorsEvent(true)); // Start of decorator 1 profiler.onDecoratorExecution(decoratorEvent(decorator1, true)); clock.sleep(10); // End of decorator 1 profiler.onDecoratorExecution(decoratorEvent(decorator1, false)); // Start of decorator 2 profiler.onDecoratorExecution(decoratorEvent(decorator2, true)); clock.sleep(5); // End of decorator 2 profiler.onDecoratorExecution(decoratorEvent(decorator2, false)); // Start of decorator 1 profiler.onDecoratorExecution(decoratorEvent(decorator1, true)); clock.sleep(10); // End of decorator 1 profiler.onDecoratorExecution(decoratorEvent(decorator1, false)); // Start of decorator 2 profiler.onDecoratorExecution(decoratorEvent(decorator2, true)); clock.sleep(5); // End of decorator 2 profiler.onDecoratorExecution(decoratorEvent(decorator2, false)); // End of decorator phase profiler.onDecoratorsPhase(decoratorsEvent(false)); }
private void postJobPhase(PhasesSumUpTimeProfiler profiler) throws InterruptedException { PostJob postJob = new FakePostJob(); // Start of sensor phase profiler.onPostJobsPhase(postJobsEvent(true)); // Start of a Sensor profiler.onPostJobExecution(postJobEvent(postJob, true)); clock.sleep(30); // End of a Sensor profiler.onPostJobExecution(postJobEvent(postJob, false)); // End of sensor phase profiler.onPostJobsPhase(postJobsEvent(false)); }
private void persistersPhase(PhasesSumUpTimeProfiler profiler) throws InterruptedException { ScanPersister persister = new FakeScanPersister(); // Start of persister phase profiler.onPersistersPhase(persistersEvent(true)); // Start of a ScanPersister profiler.onPersisterExecution(persisterEvent(persister, true)); clock.sleep(40); // End of a ScanPersister profiler.onPersisterExecution(persisterEvent(persister, false)); // End of persister phase profiler.onPersistersPhase(persistersEvent(false)); }
private void sensorPhase(PhasesSumUpTimeProfiler profiler) throws InterruptedException { Sensor sensor = new FakeSensor(); // Start of sensor phase profiler.onSensorsPhase(sensorsEvent(true)); // Start of a Sensor profiler.onSensorExecution(sensorEvent(sensor, true)); clock.sleep(10); // End of a Sensor profiler.onSensorExecution(sensorEvent(sensor, false)); // End of sensor phase profiler.onSensorsPhase(sensorsEvent(false)); }
private void initializerPhase(PhasesSumUpTimeProfiler profiler) throws InterruptedException { Initializer initializer = new FakeInitializer(); // Start of initializer phase profiler.onInitializersPhase(initializersEvent(true)); // Start of an initializer profiler.onInitializerExecution(initializerEvent(initializer, true)); clock.sleep(7); // End of an initializer profiler.onInitializerExecution(initializerEvent(initializer, false)); // End of initializer phase profiler.onInitializersPhase(initializersEvent(false)); }
private void fakeAnalysis(PhasesSumUpTimeProfiler profiler, final Project module) throws InterruptedException { // Start of moduleA profiler.onProjectAnalysis(projectEvent(module, true)); mavenPhase(profiler); initializerPhase(profiler); sensorPhase(profiler); decoratorPhase(profiler); persistersPhase(profiler); postJobPhase(profiler); batchStep(profiler); // End of moduleA profiler.onProjectAnalysis(projectEvent(module, false)); }