Package com.indeed.proctor.common.model

Examples of com.indeed.proctor.common.model.TestMatrixVersion


            System.out.println("Running load matrix for last " + num_revisions + " revisions");
            final long start = System.currentTimeMillis();
            final List<Revision> revisions = client.getMatrixHistory(0, num_revisions);
            for (final Revision rev : revisions) {
                final TestMatrixVersion matrix = client.getTestMatrix(rev.getRevision());
            }
            final long elapsed = System.currentTimeMillis() - start;
            System.out.println("Finished reading matrix history (" + revisions.size() + ") in " + elapsed + " ms");
            client.close();
        } catch (StoreException e) {
View Full Code Here


class ProctorBuilderUtils {

    static void generateArtifact(final ProctorReader proctorPersister, final Writer outputSink,
                                           final String authorOverride, final String versionOverride
    ) throws IOException, IncompatibleTestMatrixException, StoreException {
        final TestMatrixVersion currentTestMatrix = proctorPersister.getCurrentTestMatrix();
        if(currentTestMatrix == null) {
            throw new RuntimeException("Failed to load current test matrix for " + proctorPersister);
        }

        // I'm not sure if it's better for the LocalDirectoryPersister to be aware of this svn info, or for all the overrides to happen here.
        if(!CharMatcher.WHITESPACE.matchesAllOf(Strings.nullToEmpty(authorOverride))) {
            currentTestMatrix.setAuthor(authorOverride);
        }
        if(!Strings.isNullOrEmpty(versionOverride)) {
            currentTestMatrix.setVersion(versionOverride);
        }

        final TestMatrixArtifact artifact = ProctorUtils.convertToConsumableArtifact(currentTestMatrix);

        // For each test, verify that it's internally consistent (buckets sum to 1.0, final null allocation)
View Full Code Here

            System.out.println("Running load matrix for last " + num_revisions + " revisions");
            final long start = System.currentTimeMillis();
            final List<Revision> revisions = client.getMatrixHistory(0, num_revisions);
            for(final Revision rev : revisions) {
                final TestMatrixVersion matrix = client.getTestMatrix(rev.getRevision());
            }
            final long elapsed = System.currentTimeMillis() - start;
            System.out.println("Finished reading matrix history (" + revisions.size() + ") in " + elapsed + " ms");
            client.close();
        } catch (StoreException e) {
View Full Code Here

        }
        if(result == null) {
            LOGGER.error("Unable to determine tests for " + core.toString());
            return null;
        }
        TestMatrixVersion tmv = new TestMatrixVersion();

        final Map<String, TestDefinition> testDefinitions = Maps.newLinkedHashMap();
        start = System.currentTimeMillis();
        for (final TestVersionResult.Test testDefFile : result.getTests()) {
            final long startForTest = System.currentTimeMillis();
            final TestDefinition testDefinition = getTestDefinition(testDefFile.getTestName(), testDefFile.getRevision());
            if(LOGGER.isTraceEnabled()) {
                final long elapsed = System.currentTimeMillis() - startForTest;
                LOGGER.debug(String.format("Took %d ms to load %s (r%s) %s", elapsed, testDefFile.getTestName(), testDefFile.getRevision(), testDefinition == null ? "unsuccessfully" : "successfully"));
            }
            if(testDefinition == null) {
                LOGGER.info("Returning null TestMatrix because " + testDefFile.getTestName() + " returned null test-definition.");
                return null;
            }
            testDefinitions.put(testDefFile.getTestName(), testDefinition);
        }
        if(LOGGER.isDebugEnabled()) {
            final long elapsed = System.currentTimeMillis() - start;
            LOGGER.debug(String.format("Took %d ms to load all %d tests", elapsed, testDefinitions.size()));
        }

        final TestMatrixDefinition tmd = new TestMatrixDefinition();
        tmd.setTests(testDefinitions);

        tmv.setTestMatrixDefinition(tmd);

        tmv.setPublished(result.getPublished());
        tmv.setAuthor(result.getAuthor());
        tmv.setVersion(result.getVersion());
        tmv.setDescription(result.getDescription());

        return tmv;
    }
View Full Code Here

TOP

Related Classes of com.indeed.proctor.common.model.TestMatrixVersion

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.