Examples of MetricType


Examples of ch.hortis.sonar.model.MetricType

  }

  public void addMeasure(Double value, Date date, String metricName, int metricType) {
    CombinedHistoryPlot plot = plotsPerLegend.get(metricName);
    if (plot == null) {
      MetricType type = MetricType.values()[metricType];
      plot = new CombinedHistoryPlot(type, metricName, colors.pop());
      plotsPerLegend.put(metricName, plot);
      legends.add(metricName);
    }
    Double min = minsPerPlotLegend.get(metricName);
View Full Code Here

Examples of org.apache.aurora.scheduler.stats.ResourceCounter.MetricType

        FluentIterable.from(counter.computeConsumptionTotals()).transform(TO_DISPLAY).toList();
    return Response.ok(fillTemplate(metrics)).build();
  }

  private MetricType getTypeByName(String name) throws WebApplicationException {
    MetricType type = MetricType.valueOf(name.toUpperCase(Locale.ENGLISH));
    if (type == null) {
      throw new WebApplicationException(
          Response.status(Status.BAD_REQUEST).entity("Invalid metric type.").build());
    }
    return type;
View Full Code Here

Examples of org.apache.aurora.scheduler.stats.ResourceCounter.MetricType

   */
  @GET
  @Path("/{metric}")
  @Produces(MediaType.TEXT_HTML)
  public Response aggregateRoles(@PathParam("metric") final String metric) {
    final MetricType type = getTypeByName(metric);

    Function<ITaskConfig, Display> toKey = new Function<ITaskConfig, Display>() {
      @Override
      public Display apply(ITaskConfig task) {
        String role = task.getOwner().getRole();
View Full Code Here

Examples of org.apache.aurora.scheduler.stats.ResourceCounter.MetricType

  @Produces(MediaType.TEXT_HTML)
  public Response aggregateJobs(
      @PathParam("metric") String metric,
      @PathParam("role") String role) {

    MetricType type = getTypeByName(metric);
    Function<ITaskConfig, Display> toKey = new Function<ITaskConfig, Display>() {
      @Override
      public Display apply(ITaskConfig task) {
        return new Display(task.getJobName(), null);
      }
View Full Code Here

Examples of org.apache.aurora.scheduler.stats.ResourceCounter.MetricType

        FluentIterable.from(counter.computeConsumptionTotals()).transform(TO_DISPLAY).toList();
    return Response.ok(fillTemplate(metrics)).build();
  }

  private MetricType getTypeByName(String name) throws WebApplicationException {
    MetricType type = MetricType.valueOf(name.toUpperCase(Locale.ENGLISH));
    if (type == null) {
      throw new WebApplicationException(
          Response.status(Status.BAD_REQUEST).entity("Invalid metric type.").build());
    }
    return type;
View Full Code Here

Examples of org.apache.aurora.scheduler.stats.ResourceCounter.MetricType

   */
  @GET
  @Path("/{metric}")
  @Produces(MediaType.TEXT_HTML)
  public Response aggregateRoles(@PathParam("metric") final String metric) {
    final MetricType type = getTypeByName(metric);

    Function<ITaskConfig, Display> toKey = new Function<ITaskConfig, Display>() {
      @Override
      public Display apply(ITaskConfig task) {
        String role = task.getJob().getRole();
View Full Code Here

Examples of org.apache.aurora.scheduler.stats.ResourceCounter.MetricType

  @Produces(MediaType.TEXT_HTML)
  public Response aggregateJobs(
      @PathParam("metric") String metric,
      @PathParam("role") String role) {

    MetricType type = getTypeByName(metric);
    Function<ITaskConfig, Display> toKey = new Function<ITaskConfig, Display>() {
      @Override
      public Display apply(ITaskConfig task) {
        return new Display(task.getJobName(), null);
      }
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.