/** * @return the totalTweets */ @ManagedMetric(metricType=MetricType.COUNTER) public long getTotalTweets() { return totalTweets; }
@ManagedMetric(description="The QueueSize metric", currencyTimeLimit = 20, persistPolicy="OnUpdate", persistPeriod=300, category="utilization", metricType = MetricType.COUNTER, displayName="Queue Size", unit="messages") public long getQueueSize() { return 100L; }
@ManagedMetric public int getCacheEntries() { return 3; }
@ManagedMetric(description = "a metric", metricType = MetricType.COUNTER) int getCacheEntries();
@Override @ManagedMetric(category = "performance", displayName = "Inflight Requests") public long getInflightCount() { return inflight.getInflightRequests(); }
@Override @ManagedMetric(category = "performance", displayName = "Total server run time (ms)") public long getUpTime() { return inflight.getRunTime(); }
@Override @ManagedMetric(category = "performance", displayName = "Server Requests for all URI Groups") public Map<String, String> getSummary() { Map<String, String> data = new HashMap<>(); perUriMetrics.entrySet().stream().forEach(entry -> data.put(entry.getKey(), JsonUtils.writeValueAsString(entry.getValue()))); return data; }
@Override @ManagedMetric(category = "performance", displayName = "Global Server Request Summary") public String getGlobals() { return JsonUtils.writeValueAsString(perUriMetrics.get(MetricsUtil.GLOBAL_GROUP)); }
@Override @ManagedMetric(category = "performance", displayName = "Idle time (ms)") public long getIdleTime() { return inflight.getIdleTime(); }
@ManagedMetric(metricType = MetricType.COUNTER, displayName = "Flushes") public int getFlushes() { return getFlushingData("flushes", java.lang.Integer.class); }
@ManagedMetric(metricType = MetricType.GAUGE, displayName = "Resident in Physical Memory", unit = "MB") public int getResidentSpace() { return getMemData("resident", java.lang.Integer.class); }
@ManagedMetric(metricType = MetricType.GAUGE, displayName = "Virtual Address Space", unit = "MB") public int getVirtualAddressSpace() { return getMemData("virtual", java.lang.Integer.class); }
@ManagedMetric(metricType = MetricType.GAUGE, displayName = "Resets") public int getResets() { return getBtree("resets"); }
@ManagedMetric(metricType = MetricType.COUNTER, displayName = "User") public int getUser() { return getBtree("user"); }
@ManagedMetric(metricType = MetricType.GAUGE, displayName = "Last Ms", unit = "ms") public int getLastMs() { return getFlushingData("last_ms", java.lang.Integer.class); }
@ManagedMetric(metricType = MetricType.GAUGE, displayName = "Last finished") public Date getLastFinished() { return getLast(); }
@ManagedMetric(metricType = MetricType.GAUGE, displayName = "Accesses") public int getAccesses() { return getBtree("accesses"); }
@ManagedMetric(metricType = MetricType.COUNTER, displayName = "Warning") public int getWarning() { return getBtree("warning"); }
@ManagedMetric(metricType = MetricType.COUNTER, displayName = "Server uptime in seconds", unit = "seconds") public double getUptime() { return (Double) getServerStatus().get("uptime"); } }
@ManagedMetric(displayName = "Uptime Estimate") public double getUptimeEstimate() { return (Double) getServerStatus().get("uptimeEstimate"); }