Package org.gradle.performance.fixture

Examples of org.gradle.performance.fixture.PerformanceResults


                    PreparedStatement operationsForExecution = connection.prepareStatement("select version, executionTimeMs, heapUsageBytes, totalHeapUsageBytes, maxHeapUsageBytes, maxUncollectedHeapBytes, maxCommittedHeapBytes from testOperation where testExecution = ?");
                    executionsForName.setString(1, testName);
                    ResultSet testExecutions = executionsForName.executeQuery();
                    while (testExecutions.next()) {
                        long id = testExecutions.getLong(1);
                        PerformanceResults performanceResults = new PerformanceResults();
                        performanceResults.setTestId(testName);
                        performanceResults.setTestTime(testExecutions.getTimestamp(2).getTime());
                        performanceResults.setVersionUnderTest(testExecutions.getString(3));
                        performanceResults.setTestProject(testExecutions.getString(4));
                        performanceResults.setTasks(toArray(testExecutions.getObject(5)));
                        performanceResults.setArgs(toArray(testExecutions.getObject(6)));
                        performanceResults.setOperatingSystem(testExecutions.getString(7));
                        performanceResults.setJvm(testExecutions.getString(8));
                        performanceResults.setVcsBranch(testExecutions.getString(9).trim());
                        performanceResults.setVcsCommit(testExecutions.getString(10));

                        results.add(performanceResults);
                        allBranches.add(performanceResults.getVcsBranch());

                        operationsForExecution.setLong(1, id);
                        ResultSet builds = operationsForExecution.executeQuery();
                        while (builds.next()) {
                            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);
                                baselineVersion.getResults().add(operation);
                                allVersions.add(version);
                            }
                        }
                    }
View Full Code Here


                            for (String version : versions) {
                                th().classAttr("numeric").text(version).end();
                            }
                        end();
                        for (int i = 0; i < testHistory.getResults().size() && i < 5; i++) {
                            PerformanceResults performanceResults = testHistory.getResults().get(i);
                            tr();
                                td().text(format.timestamp(new Date(performanceResults.getTestTime()))).end();
                                td().text(performanceResults.getVersionUnderTest()).end();
                                td().text(performanceResults.getVcsBranch()).end();
                                for (String version : versions) {
                                    VersionResults versionResults = performanceResults.version(version);
                                    td().classAttr("numeric");
                                    if (versionResults.getResults().isEmpty()) {
                                        text("");
                                    } else {
                                        text(versionResults.getResults().getExecutionTime().getAverage().format());
                                    }
                                    end();
                                }
                                for (String version : versions) {
                                    VersionResults versionResults = performanceResults.version(version);
                                    td().classAttr("numeric");
                                    if (versionResults.getResults().isEmpty()) {
                                        text("");
                                    } else {
                                        text(versionResults.getResults().getTotalMemoryUsed().getAverage().format());
View Full Code Here

        PrintWriter out = new PrintWriter(output);
        List<PerformanceResults> sortedResults = testHistory.getResultsOldestFirst();
        out.println("{");
        out.println("\"labels\": [");
        for (int i = 0; i < sortedResults.size(); i++) {
            PerformanceResults results = sortedResults.get(i);
            if (i > 0) {
                out.print(", ");
            }
            out.print("\"" + format.date(new Date(results.getTestTime())) + "\"");
        }
        out.println("],");
        out.print("\"executionTime\":");
        render(testHistory, new Transformer<String, MeasuredOperationList>() {
            public String transform(MeasuredOperationList original) {
View Full Code Here

            out.println("  {");
            out.println("    \"label\": \"" + version + "\",");
            out.print("\"data\": [");
            boolean empty = true;
            for (int j = 0; j < sortedResults.size(); j++) {
                PerformanceResults results = sortedResults.get(j);
                MeasuredOperationList measuredOperations = results.version(version).getResults();
                if (!measuredOperations.isEmpty()) {
                    if (!empty) {
                        out.print(", ");
                    }
                    out.print("[" + j + ", " + valueRenderer.transform(measuredOperations) + "]");
View Full Code Here

TOP

Related Classes of org.gradle.performance.fixture.PerformanceResults

Copyright © 2018 www.massapicom. 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.