Package net.sourceforge.cruisecontrol

Examples of net.sourceforge.cruisecontrol.BuildInfo


    File projectLogDir = new File(logsDir, project);

    LogFile latestLog = LogFile.getLatestLogFile(projectLogDir);
    if (latestLog != null) {
      this.latest = new BuildInfo(latestLog);
    }

    LogFile successLog = LogFile.getLatestSuccessfulLogFile(projectLogDir);
    if (successLog != null) {
      this.lastSuccessful = new BuildInfo(successLog);
    }

    File statusFile = new File(projectLogDir, fileName);
    BufferedReader reader = null;
    try {
View Full Code Here


    public void testProduceDatasetBuildsInSameMinute() throws Exception {
        TimeChartData data = new TimeChartData();
        Map map = new HashMap();

        List buildInfos = new ArrayList();
        BuildInfo info = new BuildInfo("log20050708100401.log");
        buildInfos.add(info);
        info = new BuildInfo("log20050708100431.log");
        buildInfos.add(info);
        BuildInfoSummary buildInfoSummary = new BuildInfoSummary(buildInfos);
        map.put("buildInfo", buildInfoSummary);
        data.produceDataset(map);
    }
View Full Code Here

    public Object produceDataset(Map params) throws DatasetProduceException {
        BuildInfoSummary summary = (BuildInfoSummary) params.get("buildInfo");
        TimeSeries brokenSeries = new TimeSeries("Broken Builds", Minute.class);
        TimeSeries goodSeries = new TimeSeries("Good Builds", Minute.class);
        for (Iterator iter = summary.iterator(); iter.hasNext();) {
            BuildInfo buildInfo = (BuildInfo) iter.next();
            Date buildTime = buildInfo.getBuildDate();
            double timeValue = extractTimeOfDay(buildTime);
            Minute timePeriod = new Minute(buildTime);
            TimeSeries seriesToAddTo = buildInfo.isSuccessful() ? goodSeries
                                                                : brokenSeries;
            if (seriesToAddTo.getDataPair(timePeriod) == null) {
                seriesToAddTo.add(timePeriod, timeValue);
            } else {
                System.err.println("multiple logs in the same minute; ignoring: " + buildInfo.getFileName());
            }
        }
        TimeSeriesCollection dataset = new TimeSeriesCollection();
        dataset.addSeries(brokenSeries);
        dataset.addSeries(goodSeries);
View Full Code Here

TOP

Related Classes of net.sourceforge.cruisecontrol.BuildInfo

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.