use of org.gradle.internal.time.Timer in project gradle by gradle.
the class WorkerDaemonStarter method startDaemon.
public WorkerDaemonClient startDaemon(Class<? extends WorkerProtocol> workerProtocolImplementationClass, File workingDir, DaemonForkOptions forkOptions) {
LOG.debug("Starting Gradle worker daemon with fork options {}.", forkOptions);
Timer clock = Timers.startTimer();
MultiRequestWorkerProcessBuilder<WorkerDaemonProcess> builder = workerDaemonProcessFactory.multiRequestWorker(WorkerDaemonProcess.class, WorkerProtocol.class, workerProtocolImplementationClass);
builder.setBaseName("Gradle Worker Daemon");
// NOTE: might make sense to respect per-compile-task log level
builder.setLogLevel(startParameter.getLogLevel());
builder.applicationClasspath(forkOptions.getClasspath());
builder.sharedPackages(forkOptions.getSharedPackages());
JavaExecHandleBuilder javaCommand = builder.getJavaCommand();
javaCommand.setMinHeapSize(forkOptions.getMinHeapSize());
javaCommand.setMaxHeapSize(forkOptions.getMaxHeapSize());
javaCommand.setJvmArgs(forkOptions.getJvmArgs());
javaCommand.setWorkingDir(workingDir);
WorkerDaemonProcess workerDaemonProcess = builder.build();
WorkerProcess workerProcess = workerDaemonProcess.start();
WorkerDaemonClient client = new WorkerDaemonClient(forkOptions, workerDaemonProcess, workerProcess, buildOperationExecutor);
LOG.info("Started Gradle worker daemon ({}) with fork options {}.", clock.getElapsed(), forkOptions);
return client;
}
use of org.gradle.internal.time.Timer in project gradle by gradle.
the class DefaultTestReport method generateReport.
@Override
public void generateReport(TestResultsProvider resultsProvider, File reportDir) {
LOG.info("Generating HTML test report...");
Timer clock = Timers.startTimer();
AllTestResults model = loadModelFromProvider(resultsProvider);
generateFiles(model, resultsProvider, reportDir);
LOG.info("Finished generating test html results ({}) into: {}", clock.getElapsed(), reportDir);
}
use of org.gradle.internal.time.Timer in project gradle by gradle.
the class DefaultTaskGraphExecuter method execute.
public void execute() {
Timer clock = Time.startTimer();
ensurePopulated();
graphListeners.getSource().graphPopulated(this);
try {
taskPlanExecutor.process(taskExecutionPlan, new EventFiringTaskWorker(taskExecuter.create(), buildOperationExecutor.getCurrentOperation()));
LOGGER.debug("Timing: Executing the DAG took " + clock.getElapsed());
} finally {
taskExecutionPlan.clear();
}
}
use of org.gradle.internal.time.Timer in project gradle by gradle.
the class ResolveTaskArtifactStateTaskExecuter method execute.
@Override
public void execute(TaskInternal task, TaskStateInternal state, TaskExecutionContext context) {
Timer clock = Time.startTimer();
TaskProperties taskProperties = DefaultTaskProperties.resolve(propertyWalker, resolver, task);
context.setTaskProperties(taskProperties);
TaskArtifactState taskArtifactState = repository.getStateFor(task, taskProperties);
TaskOutputsInternal outputs = task.getOutputs();
context.setTaskArtifactState(taskArtifactState);
outputs.setHistory(taskArtifactState.getExecutionHistory());
LOGGER.debug("Putting task artifact state for {} into context took {}.", task, clock.getElapsed());
try {
executer.execute(task, state, context);
} finally {
outputs.setHistory(null);
context.setTaskArtifactState(null);
context.setTaskProperties(null);
LOGGER.debug("Removed task artifact state for {} from context.");
}
}
use of org.gradle.internal.time.Timer in project gradle by gradle.
the class JarClasspathSnapshotMaker method storeJarSnapshots.
@Override
public void storeJarSnapshots(Iterable<File> classpath) {
// clients may or may not have already created jar classpath snapshot
maybeInitialize(classpath);
Timer clock = Time.startTimer();
classpathSnapshotStore.put(jarClasspathSnapshot.getData());
LOG.info("Written jar classpath snapshot for incremental compilation in {}.", clock.getElapsed());
}
Aggregations