Examples of Baseline


Examples of aQute.bnd.differ.Baseline

          if (!subBundles.contains(builder.getPropertiesFile())) {
            continue;
          }
        }

        Baseline diff = DiffHelper.createBaseline(project, builder.getBsn());
        if (diff != null) {
          diffs.add(diff);
        }
      }
      if (diffs.size() == 0) {
        //TODO: message
        return Status.OK_STATUS;
      }
      monitor.worked(33);

      Runnable runnable = new Runnable() {
        public void run() {
            List<ProjectDiff> projectDiffs = new ArrayList<ProjectDiff>();
            projectDiffs.add(new ProjectDiff(project, diffs));
                ReleaseHelper.initializeProjectDiffs(projectDiffs);
            WorkspaceReleaseDialog dialog = new WorkspaceReleaseDialog(shell, projectDiffs, true);
          if (dialog.open() == WorkspaceReleaseDialog.OK) {
              boolean runJob = false;
                  for (ProjectDiff diff : projectDiffs) {
                      if (diff.isRelease()) {
                          runJob = true;
                          break;
                      }
                  }
              if (!runJob) {
View Full Code Here

Examples of com.dianping.cat.home.dal.report.Baseline

        values.add(oneDayValue);
      }

      double[] result = m_baselineCreator.createBaseLine(values, weights, POINT_NUMBER);
      Baseline baseline = new Baseline();
      baseline.setDataInDoubleArray(result);
      baseline.setIndexKey(key);
      baseline.setReportName(reportName);
      baseline.setReportPeriod(targetDate);
      m_baselineService.insertBaseline(baseline);

      Date tomorrow = new Date(reportPeriod.getTime() + TimeHelper.ONE_DAY);
      double[] baseLine = m_baselineService.queryDailyBaseline(reportName, key, tomorrow);

      if (baseLine == null) {
        Baseline tomorrowBaseline = new Baseline();

        tomorrowBaseline.setDataInDoubleArray(result);
        tomorrowBaseline.setIndexKey(key);
        tomorrowBaseline.setReportName(reportName);
        tomorrowBaseline.setReportPeriod(tomorrow);
        m_baselineService.insertBaseline(tomorrowBaseline);
      }
    }
  }
View Full Code Here

Examples of com.dianping.cat.home.dal.report.Baseline

  }

  @Override
  public double[] queryDailyBaseline(String reportName, String key, Date reportPeriod) {
    String baselineKey = reportName + ":" + key + ":" + reportPeriod;
    Baseline baseline = m_baselines.get(baselineKey);

    if (baseline == null) {
      try {
        String str = m_empties.get(baselineKey);

        if (str == null) {
          baseline = m_baselineDao.findByReportNameKeyTime(reportPeriod, reportName, key,
                BaselineEntity.READSET_FULL);
          m_baselines.put(baselineKey, baseline);
        } else {
          return null;
        }
      } catch (DalNotFoundException e) {
        m_empties.put(baselineKey, baselineKey);
        return null;
      } catch (Exception e) {
        Cat.logError(e);
        return null;
      }
    }

    try {
      return decodeBaselines(baseline.getData());
    } catch (Exception e) {
      Cat.logError(e);
      return null;
    }
  }
View Full Code Here

Examples of org.rhq.enterprise.server.rest.domain.Baseline

    @ApiError(code = 404, reason = NO_SCHEDULE_FOR_ID)
    public Baseline getBaseline(@ApiParam("Id of the schedule") @PathParam("scheduleId") int scheduleId) {
        MeasurementSchedule schedule = obtainSchedule(scheduleId, true, DataType.MEASUREMENT);
        MeasurementBaseline mBase = schedule.getBaseline();

        Baseline b;
        if (mBase==null)
            throw new StuffNotFoundException("Baseline for schedule [" + scheduleId +"]");
        else
            b = new Baseline(mBase.getMin(),mBase.getMax(),mBase.getMean(),mBase.getComputeTime().getTime());
        return b;

    }
View Full Code Here

Examples of org.rhq.modules.integrationTests.restApi.d.Baseline

    @Test
    public void testSetGetBaseline() throws Exception {

        long now = System.currentTimeMillis();

        Baseline baseline = new Baseline(0.0,2.0,1.0,now);

        given()
            .contentType(ContentType.XML)
            .header(acceptJson)
            .body(baseline)
            .pathParam("sid", numericScheduleId)
        .expect()
            .statusCode(201)
            .log().ifError()
        .when()
            .put("/metric/data/{sid}/baseline");

        Baseline result =
        given()
            .header(acceptJson)
            .pathParam("sid",numericScheduleId)
        .expect()
            .statusCode(200)
            .log().ifError()
        .when()
            .get("/metric/data/{sid}/baseline")
        .as(Baseline.class);

        assert result.equals(baseline);
    }
View Full Code Here

Examples of org.rhq.modules.integrationTests.restApi.d.Baseline

    @Test
    public void testSetBadBaseline() throws Exception {

        long now = System.currentTimeMillis();

        Baseline baseline = new Baseline(10.0,1.0,2.0,now);

        given()
            .contentType(ContentType.JSON)
            .header(acceptJson)
            .body(baseline)
View Full Code Here

Examples of org.rhq.modules.integrationTests.restApi.d.Baseline

            .put("/metric/data/{sid}/baseline");
    }

    @Test
    public void testSetUnknownBaseline() throws Exception {
        Baseline baseline = new Baseline(0.0,2.0,1.0,1000L);

        given()
            .contentType(ContentType.XML)
            .header(acceptJson)
            .body(baseline)
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.