Examples of Total


Examples of org.apache.kafka.common.metrics.stats.Total

        s.add("test.count", new Count());
        s.add(new Percentiles(100, -100, 100, BucketSizing.CONSTANT, new Percentile("test.median", 50.0), new Percentile("test.perc99_9",
                                                                                                                         99.9)));

        Sensor s2 = metrics.sensor("test.sensor2");
        s2.add("s2.total", new Total());
        s2.record(5.0);

        for (int i = 0; i < 10; i++)
            s.record(i);
View Full Code Here

Examples of org.apache.kafka.common.metrics.stats.Total

    }

    @Test(expected = IllegalArgumentException.class)
    public void testDuplicateMetricName() {
        metrics.sensor("test").add("test", new Avg());
        metrics.sensor("test2").add("test", new Total());
    }
View Full Code Here

Examples of org.apache.kafka.common.metrics.stats.Total

    }

    @Test
    public void testQuotas() {
        Sensor sensor = metrics.sensor("test");
        sensor.add("test1.total", new Total(), new MetricConfig().quota(Quota.lessThan(5.0)));
        sensor.add("test2.total", new Total(), new MetricConfig().quota(Quota.moreThan(0.0)));
        sensor.record(5.0);
        try {
            sensor.record(1.0);
            fail("Should have gotten a quota violation.");
        } catch (QuotaViolationException e) {
View Full Code Here

Examples of org.apache.kafka.common.metrics.stats.Total

    public void testJmxRegistration() throws Exception {
        Metrics metrics = new Metrics();
        metrics.addReporter(new JmxReporter());
        Sensor sensor = metrics.sensor("kafka.requests");
        sensor.add("pack.bean1.avg", new Avg());
        sensor.add("pack.bean2.total", new Total());
        Sensor sensor2 = metrics.sensor("kafka.blah");
        sensor2.add("pack.bean1.some", new Total());
        sensor2.add("pack.bean2.some", new Total());
    }
View Full Code Here

Examples of org.saiku.web.rest.objects.resultset.Total

    Total[][] retVal = new Total[totalLists.length][];
    for (int i = 0; i < totalLists.length; i++) {
      List<TotalNode> current = totalLists[i];
      retVal[i] = new Total[current.size()];
      for (int j = 0; j < current.size(); j++) {
        retVal[i][j] = new Total(current.get(j));
      }
    }
    return retVal;
  }
View Full Code Here

Examples of org.yaac.shared.stat.models.Total

  @Override
  public StatDTO loadStat() {
    Date timestamp = new Date();
 
    Total total = new Total(1000L, 10L, timestamp);

    Map<String, Iterable<KindWrapper>> kindsMap = new HashMap<String, Iterable<KindWrapper>>();
   
    {
      List<KindWrapper> kinds = new LinkedList<KindWrapper>();
View Full Code Here

Examples of org.yaac.shared.stat.models.Total

  @SuppressWarnings("unused")
  private StatDTO oldVersionMockData() {
    Date timestamp = new Date();
   
    Total total = new Total(1000L, 10L, timestamp);
   
    Map<String, NSTotal> nsTotalsMap = new HashMap<String, NSTotal>();
    nsTotalsMap.put("", new NSTotal(500L, 3L, new Date()));
    nsTotalsMap.put("namespace_1", new NSTotal(200L, 3L, timestamp));
    nsTotalsMap.put("namespace_2", new NSTotal(300L, 4L, timestamp));
View Full Code Here

Examples of org.yaac.shared.stat.models.Total

        nsPropertyTypeNameKindsMap.put(namespace, ofy.query(NSPropertyTypePropertyNameKind.class).fetch());
      }
      NamespaceManager.set(null)// reset namespace
     
      // ====================== step 2, assemble results=====================
      Total total = DatastoreUtil.singleEntityFrom(totals);
     
      Map<String, Iterable<KindWrapper>> nsKindsWrapperMap = new HashMap<String, Iterable<KindWrapper>>();
     
      for (String namespace : nsKindsMap.keySet()) {
        // kinds
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.