Examples of MeasuredOperation


Examples of org.gradle.performance.measure.MeasuredOperation

                            String version = builds.getString(1);
                            if ("1.7".equals(version) && performanceResults.getTestTime() <= ignoreV17Before) {
                                // Ignore some broken samples
                                continue;
                            }
                            MeasuredOperation operation = new MeasuredOperation();
                            operation.setExecutionTime(Duration.millis(builds.getBigDecimal(2)));
                            operation.setTotalMemoryUsed(DataAmount.bytes(builds.getBigDecimal(3)));
                            operation.setTotalHeapUsage(DataAmount.bytes(builds.getBigDecimal(4)));
                            operation.setMaxHeapUsage(DataAmount.bytes(builds.getBigDecimal(5)));
                            operation.setMaxUncollectedHeap(DataAmount.bytes(builds.getBigDecimal(6)));
                            operation.setMaxCommittedHeap(DataAmount.bytes(builds.getBigDecimal(7)));

                            if (version == null) {
                                performanceResults.getCurrent().add(operation);
                            } else {
                                BaselineVersion baselineVersion = performanceResults.baseline(version);
View Full Code Here

Examples of org.gradle.performance.measure.MeasuredOperation

import org.gradle.performance.measure.Duration;
import org.gradle.performance.measure.MeasuredOperation;

public class OperationTimer {
    public MeasuredOperation measure(Closure operation) {
        MeasuredOperation result = new MeasuredOperation();
        long start = System.currentTimeMillis();
        try {
            operation.call(result);
        } catch (Exception e) {
            result.setException(e);
        }
        long end = System.currentTimeMillis();
        result.setExecutionTime(Duration.millis(end - start));
        return result;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.