Examples of Metric


Examples of com.jitlogic.zorka.common.tracedata.Metric

        Assert.assertNotNull(samples);
        Assert.assertEquals(2, samples.size());

        for (PerfSample sample : samples) {
            Assert.assertTrue("Should have non-zero metric ID", sample.getMetricId() > 0);
            Metric metric = agentInstance.getMetricsRegistry().getMetric(sample.getMetricId());
            Assert.assertTrue("Template should have non-zero metric ID", metric.getTemplate().getId() > 0);
        }
    }
View Full Code Here

Examples of com.metrictracker.model.Metric

  private static final Logger log = Logger.getLogger(ManageMetricGoal.class.getName());
 
    @Get
    public String rep() {
   
      Metric metric = getMetric();
     
      MetricGoalDao dao = new MetricGoalDao();
      Iterator<MetricGoal> metricGoals = dao.listByProperty("metricKey", metric.getKey()).iterator();
     
    StringBuffer sb = new StringBuffer("");
    sb.append("Metric Name: " + metric.getName());
    sb.append(System.getProperty("line.separator"));
    sb.append("Goal Name\t");
    sb.append("Goal Type\t");
    sb.append("Effective\t\t\t");
    sb.append("Expiration\t\t\t");
View Full Code Here

Examples of com.netflix.servo.Metric

        Number num = asNumber(value);
        if (num != null) {
            TagList newTags = counters.matches(MonitorConfig.builder(name).withTags(tags).build())
                ? SortedTagList.builder().withTags(tags).withTag(DataSourceType.COUNTER).build()
                : SortedTagList.builder().withTags(tags).withTag(DataSourceType.GAUGE).build();
            Metric m = new Metric(name, newTags, now, num);
            metrics.add(m);
        }
    }
View Full Code Here

Examples of com.psddev.dari.db.Metric

                                        1.0;

                                request.setAttribute(MAX_SUM_ATTRIBUTE, maxSum);
                            }

                            Metric valueMetric = (Metric) value;
                            Map<DateTime, Double> sumEntries = valueMetric.groupSumByDate(
                                    new MetricInterval.Daily(),
                                    new DateTime().dayOfMonth().roundFloorCopy().minusDays(7),
                                    null);

                            double sum = valueMetric.getSum();
                            long sumLong = (long) sum;

                            if (sumLong == sum) {
                                page.writeHtml(String.format("%,2d ", sumLong));
View Full Code Here

Examples of com.rackspacecloud.blueflood.types.Metric

        if (metricValue == null || collectionTime == null || ttlInSeconds == null || unit == null || tenantId == null || metricName == null) {
            throw new IOException("A required field was not found."); // TODO: specificity
        }

        Locator locator = Locator.createLocatorFromPathComponents(tenantId, metricName);
        Metric m = new Metric(locator, metricValue, collectionTime, new TimeValue(ttlInSeconds, TimeUnit.SECONDS), unit);
        return m;
    }
View Full Code Here

Examples of com.ryantenney.metrics.annotation.Metric

    this.metrics = metrics;
  }

  @Override
  protected void withField(Object bean, String beanName, Class<?> targetClass, Field field) {
    final Metric annotation = field.getAnnotation(Metric.class);
    final String metricName = Util.forMetricField(targetClass, field, annotation);

    final Class<?> type = field.getType();
    if (!com.codahale.metrics.Metric.class.isAssignableFrom(type)) {
      throw new IllegalArgumentException("Field " + targetClass.getCanonicalName() + "." + field.getName() + " must be a subtype of "
View Full Code Here

Examples of com.seyren.core.service.live.Metric

    private static class PythonToJava implements Function<Object, Metric> {
        @Override
        public Metric apply(Object pyObject) {
            PyTuple pyTuple = (PyTuple) pyObject;
            Metric metric = new Metric();
            metric.setName(pyTuple.get(0).toString());
            PyTuple data = ((PyTuple) pyTuple.get(1));
            metric.setTimestamp(new Date(((Number) data.get(0)).longValue() * 1000));
            metric.setValue(new BigDecimal(((Number) data.get(1)).doubleValue()));
            return metric;
        }
View Full Code Here

Examples of com.streamreduce.core.model.Metric

    public ObjectId objectId;

    @Before
    public void setUp() throws Exception {
        MetricDAO metricDao = new MetricDAO(messageDBDatastore);
        Key<Metric> key = metricDao.save(new Metric()
                .setAccountId(ACCOUNT_ID)
                .setName(MetricName.INVENTORY_ITEM_RESOURCE_USAGE.toString())
                .setType(MetricModeType.ABSOLUTE.toString())
                .setTs(System.currentTimeMillis())
                .setValue(48.12f)
View Full Code Here

Examples of com.yammer.metrics.core.Metric

  protected void addCodahaleMetrics(final MetricTreeObject tree) {
    for (Entry<String, SortedMap<MetricName, Metric>> entry : getMetricsRegistry().groupedMetrics(predicate)
        .entrySet()) {
      for (Entry<MetricName, Metric> subEntry : entry.getValue().entrySet()) {
        final Metric metric = subEntry.getValue();
        if (metric != null) {
          try {
            MetricDispatcher.dispatch(subEntry.getValue(), subEntry.getKey(), this, tree);
          } catch (Exception ignored) {
            LOG.error("Error printing regular metrics:", ignored);
View Full Code Here

Examples of com.yammer.metrics.core.Metric

       
        @Override
        public String value() {
            Map<String,Double> latencies = new HashMap<String,Double>();
            for(Map.Entry<MetricName,Metric> e: registry.allMetrics().entrySet()) {
                Metric metric = e.getValue();
                if(metric instanceof SHTimerMetric) {
                    SHTimerMetric timerMetric = (SHTimerMetric)metric;
                    latencies.put(e.getKey().getName(), timerMetric.getSnapshot().getValue(0.9D));
                }
            }
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.