Examples of Snapshot


Examples of com.yammer.metrics.stats.Snapshot

        printReportToConsole(lastReport);

        if (latenciesMiddle == null)
            return;

        Snapshot snapshot = latenciesMiddle.getSnapshot();

        System.out.println();
        System.out.println("For the middle 80% of values:");
        System.out.println(String.format("  Mean rate (ops/sec):          %10.1f", meanMiddleRate));
        System.out.println(String.format("  Mean latency (ms):            %10.3f", latenciesMiddle.mean()));
        System.out.println(String.format("  Median latency (ms):          %10.3f", snapshot.getMedian()));
        System.out.println(String.format("  75th percentile latency (ms): %10.3f", snapshot.get75thPercentile()));
        System.out.println(String.format("  95th percentile latency (ms): %10.3f", snapshot.get95thPercentile()));
        System.out.println(String.format("  99th percentile latency (ms): %10.3f", snapshot.get99thPercentile()));
        System.out.println(String.format("  Standard latency deviation:   %10.3f", latenciesMiddle.stdDev()));
    }
View Full Code Here

Examples of com.yammer.metrics.stats.Snapshot

            this.totalOps = meter.count();
            this.intervalRate = totalOps - lastOpCount;
            this.meanRate = meter.meanRate();

            Snapshot snapshot = timer.getSnapshot();
            this.meanLatency = timer.mean();
            this.latency95th = snapshot.get95thPercentile();
            this.latency99th = snapshot.get99thPercentile();
            this.stdDev = timer.stdDev();
        }
View Full Code Here

Examples of com.yammer.metrics.stats.Snapshot

        histogram.getName() + "Mean",
        StringUtils.limitDecimalTo2(histogram.getMean()));
    sb = Strings.appendKeyValue(sb,
        histogram.getName() + "Count",
        StringUtils.limitDecimalTo2(histogram.getCount()));
    final Snapshot s = histogram.getSnapshot();
    sb = Strings.appendKeyValue(sb,
        histogram.getName() + "Median",
        StringUtils.limitDecimalTo2(s.getMedian()));
    sb = Strings.appendKeyValue(sb,
        histogram.getName() + "75th",
        StringUtils.limitDecimalTo2(s.get75thPercentile()));
    sb = Strings.appendKeyValue(sb,
        histogram.getName() + "95th",
        StringUtils.limitDecimalTo2(s.get95thPercentile()));
    sb = Strings.appendKeyValue(sb,
        histogram.getName() + "99th",
        StringUtils.limitDecimalTo2(s.get99thPercentile()));
    sb = Strings.appendKeyValue(sb,
        histogram.getName() + "999th",
        StringUtils.limitDecimalTo2(s.get999thPercentile()));
    return sb;
  }
View Full Code Here

Examples of com.yammer.metrics.stats.Snapshot

          } else if (name.endsWith(MetricsHistogram.MEAN_METRIC_NAME)) {
            return (float) hist.getMean();
          } else if (name.endsWith(MetricsHistogram.STD_DEV_METRIC_NAME)) {
            return (float) hist.getStdDev();
          } else if (name.endsWith(MetricsHistogram.MEDIAN_METRIC_NAME)) {
            Snapshot s = hist.getSnapshot();
            return (float) s.getMedian();
          } else if (name.endsWith(MetricsHistogram.SEVENTY_FIFTH_PERCENTILE_METRIC_NAME)) {
            Snapshot s = hist.getSnapshot();
            return (float) s.get75thPercentile();
          } else if (name.endsWith(MetricsHistogram.NINETY_FIFTH_PERCENTILE_METRIC_NAME)) {
            Snapshot s = hist.getSnapshot();
            return (float) s.get95thPercentile();
          } else if (name.endsWith(MetricsHistogram.NINETY_NINETH_PERCENTILE_METRIC_NAME)) {
            Snapshot s = hist.getSnapshot();
            return (float) s.get99thPercentile();
          }

        } else {
          LOG.warn( String.format("unknown metrics type %s for attribute %s",
                        metric.getClass().getName(), name) );
View Full Code Here

Examples of com.yammer.metrics.stats.Snapshot

        histogram.getName() + "Mean",
        StringUtils.limitDecimalTo2(histogram.getMean()));
    sb = Strings.appendKeyValue(sb,
        histogram.getName() + "Count",
        StringUtils.limitDecimalTo2(histogram.getCount()));
    final Snapshot s = histogram.getSnapshot();
    sb = Strings.appendKeyValue(sb,
        histogram.getName() + "Median",
        StringUtils.limitDecimalTo2(s.getMedian()));
    sb = Strings.appendKeyValue(sb,
        histogram.getName() + "75th",
        StringUtils.limitDecimalTo2(s.get75thPercentile()));
    sb = Strings.appendKeyValue(sb,
        histogram.getName() + "95th",
        StringUtils.limitDecimalTo2(s.get95thPercentile()));
    sb = Strings.appendKeyValue(sb,
        histogram.getName() + "99th",
        StringUtils.limitDecimalTo2(s.get99thPercentile()));
    sb = Strings.appendKeyValue(sb,
        histogram.getName() + "999th",
        StringUtils.limitDecimalTo2(s.get999thPercentile()));
    return sb;
  }
View Full Code Here

Examples of com.yammer.metrics.stats.Snapshot

      histogramJsonObject.put("min", histogram.min());
      histogramJsonObject.put("max", histogram.max());
      histogramJsonObject.put("mean", histogram.mean());
      histogramJsonObject.put("stdDev", histogram.stdDev());

      Snapshot snapshot = histogram.getSnapshot();
      JSONObject snapshotJsonObject = new JSONObject();
      snapshotJsonObject.put("median", snapshot.getMedian());
      snapshotJsonObject.put("75%", snapshot.get75thPercentile());
      snapshotJsonObject.put("95%", snapshot.get95thPercentile());
      snapshotJsonObject.put("98%", snapshot.get98thPercentile());
      snapshotJsonObject.put("99%", snapshot.get99thPercentile());
      snapshotJsonObject.put("99.9%", snapshot.get999thPercentile());

      histogramJsonObject.put("snapshot", snapshotJsonObject);

      jsonObject.put("value", histogramJsonObject);
      context.write(jsonObject);
View Full Code Here

Examples of com.yammer.metrics.stats.Snapshot

      timerJsonObject.put("max", timer.max());
      timerJsonObject.put("mean", timer.mean());
      timerJsonObject.put("stdDev", timer.stdDev());
      addMeterInfo(timer, timerJsonObject);

      Snapshot snapshot = timer.getSnapshot();
      JSONObject snapshotJsonObject = new JSONObject();
      snapshotJsonObject.put("median", snapshot.getMedian());
      snapshotJsonObject.put("75%", snapshot.get75thPercentile());
      snapshotJsonObject.put("95%", snapshot.get95thPercentile());
      snapshotJsonObject.put("98%", snapshot.get98thPercentile());
      snapshotJsonObject.put("99%", snapshot.get99thPercentile());
      snapshotJsonObject.put("99.9%", snapshot.get999thPercentile());

      timerJsonObject.put("snapshot", snapshotJsonObject);

      jsonObject.put("value", timerJsonObject);
View Full Code Here

Examples of it.eng.spagobi.analiticalmodel.document.bo.Snapshot

  public static Snapshot getNamedHistorySnapshot(List allsnapshots, String namesnap, int hist) throws Exception {
    Map snapshots = new HashMap();
    List snapDates = new ArrayList();
    Iterator iterAllSnap = allsnapshots.iterator();
    while(iterAllSnap.hasNext()) {
      Snapshot snap =  (Snapshot)iterAllSnap.next();
      if(snap.getName().equals(namesnap)){
        Date creationDate = snap.getDateCreation();
        Long creationLong = new Long(creationDate.getTime());
        snapDates.add(creationLong);
        snapshots.put(creationLong, snap);
      }
    }
    // check if history is out of range
    if( (hist<0) || (snapDates.size()-1 < hist) ) {
      SpagoBITracer.major(SpagoBIConstants.NAME_MODULE, SchedulerUtilities.class.getName(),
                      "getNamedHistorySnapshot", "History step out of range");
      throw new Exception("History step out of range");
    }
    // get the right snapshot
    Collections.sort(snapDates);
    Collections.reverse(snapDates);
    Object key = snapDates.get(hist);
    Snapshot snap = (Snapshot)snapshots.get(key);
    return snap;
  }
View Full Code Here

Examples of org.apache.aurora.gen.storage.Snapshot

    expect(driverFactory.apply(null)).andReturn(driver).anyTimes();

    ScheduledTask snapshotTask = makeTask("snapshotTask", ScheduleStatus.ASSIGNED);
    ScheduledTask transactionTask = makeTask("transactionTask", ScheduleStatus.RUNNING);
    Iterable<Entry> recoveredEntries = toEntries(
        LogEntry.snapshot(new Snapshot().setTasks(ImmutableSet.of(snapshotTask))),
        LogEntry.transaction(new Transaction(
            ImmutableList.of(Op.saveTasks(new SaveTasks(ImmutableSet.of(transactionTask)))),
            storageConstants.CURRENT_SCHEMA_VERSION)));

    expect(log.open()).andReturn(logStream);
View Full Code Here

Examples of org.apache.hadoop.hbase.HMemcache.Snapshot

      throws IOException {
    // Save off old state.
    int oldHistorySize = hmc.history.size();
    TreeMap<HStoreKey, BytesWritable> oldMemcache = hmc.memcache;
    // Run snapshot.
    Snapshot s = hmc.snapshotMemcacheForLog(log);
    // Make some assertions about what just happened.
    assertEquals("Snapshot equals old memcache", hmc.snapshot,
        oldMemcache);
    assertEquals("Returned snapshot holds old memcache",
        s.memcacheSnapshot, oldMemcache);
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.