JStatData jsd = JStatData.connect(pid); youngGcCnt = (LongCounter) jsd.getAllCounters().get("sun.gc.collector.0.invocations"); ygc = youngGcCnt == null ? 0 : youngGcCnt.getLong(); if (ygc != youngGcCnt.getLong()) { System.out.println("Warning: one or more young collections have occured during sampling."); System.out.println("Use --sample-depth option to reduce time to sample if needed.");
JStatData jsd = JStatData.connect(pid); youngGcCnt = (LongCounter) jsd.getAllCounters().get("sun.gc.collector.0.invocations"); ygc = youngGcCnt == null ? 0 : youngGcCnt.getLong(); if (ygc != youngGcCnt.getLong()) { System.out.println("Warning: one or more young collections have occured during sampling."); System.out.println("Use --sample-depth option to reduce time to sample if needed.");
JStatData jsd = JStatData.connect(pid); youngGcCnt = (LongCounter) jsd.getAllCounters().get("sun.gc.collector.0.invocations"); ygc = youngGcCnt == null ? 0 : youngGcCnt.getLong(); if (ygc != youngGcCnt.getLong()) { System.out.println("Warning: one or more young collections have occured during sampling."); System.out.println("Use --sample-depth option to reduce time to sample if needed.");
GcGeneration(Map<String, JStatData.Counter<?>> jStatCounters, long genIndex, String name) { this.name = name.toLowerCase(); long spacesCount = ((JStatData.LongCounter) jStatCounters.get( String.format("sun.gc.generation.%d.spaces", genIndex) )).getLong(); for (long spaceIndex = 0; spaceIndex < spacesCount; spaceIndex++) { spaces.add(new GcGenerationSpace(jStatCounters, genIndex, spaceIndex)); } if (jStatCounters.containsKey(String.format("sun.gc.collector.%d.name", genIndex))) { collector = new GcGenerationCollector(jStatCounters, genIndex); } else { collector = null; } }
GcGeneration(Map<String, JStatData.Counter<?>> jStatCounters, long genIndex, String name) { this.name = name.toLowerCase(); long spacesCount = ((JStatData.LongCounter) jStatCounters.get( String.format("sun.gc.generation.%d.spaces", genIndex) )).getLong(); for (long spaceIndex = 0; spaceIndex < spacesCount; spaceIndex++) { spaces.add(new GcGenerationSpace(jStatCounters, genIndex, spaceIndex)); } if (jStatCounters.containsKey(String.format("sun.gc.collector.%d.name", genIndex))) { collector = new GcGenerationCollector(jStatCounters, genIndex); } else { collector = null; } }
GcGeneration(Map<String, JStatData.Counter<?>> jStatCounters, long genIndex, String name) { this.name = name.toLowerCase(); long spacesCount = ((JStatData.LongCounter) jStatCounters.get( String.format("sun.gc.generation.%d.spaces", genIndex) )).getLong(); for (long spaceIndex = 0; spaceIndex < spacesCount; spaceIndex++) { spaces.add(new GcGenerationSpace(jStatCounters, genIndex, spaceIndex)); } if (jStatCounters.containsKey(String.format("sun.gc.collector.%d.name", genIndex))) { collector = new GcGenerationCollector(jStatCounters, genIndex); } else { collector = null; } }
GcGeneration(Map<String, JStatData.Counter<?>> jStatCounters, long genIndex, String name) { this.name = StringUtils.toLowerCase(name); long spacesCount = ((JStatData.LongCounter) jStatCounters.get( StringUtils.format("sun.gc.generation.%d.spaces", genIndex) )).getLong(); for (long spaceIndex = 0; spaceIndex < spacesCount; spaceIndex++) { spaces.add(new GcGenerationSpace(jStatCounters, genIndex, spaceIndex)); } if (jStatCounters.containsKey(StringUtils.format("sun.gc.collector.%d.name", genIndex))) { collector = new GcGenerationCollector(jStatCounters, genIndex); } else { collector = null; } }
GcGeneration(Map<String, JStatData.Counter<?>> jStatCounters, long genIndex, String name) { this.name = StringUtils.toLowerCase(name); long spacesCount = ((JStatData.LongCounter) jStatCounters.get( StringUtils.format("sun.gc.generation.%d.spaces", genIndex) )).getLong(); for (long spaceIndex = 0; spaceIndex < spacesCount; spaceIndex++) { spaces.add(new GcGenerationSpace(jStatCounters, genIndex, spaceIndex)); } if (jStatCounters.containsKey(StringUtils.format("sun.gc.collector.%d.name", genIndex))) { collector = new GcGenerationCollector(jStatCounters, genIndex); } else { collector = null; } }
@Override public long getSafePointCount() { return safePointCount == null ? 0 : safePointCount.getLong(); }
void emit(ServiceEmitter emitter, Map<String, String[]> dimensions) { final ServiceMetricEvent.Builder builder = builder(); MonitorUtils.addDimensionsToBuilder(builder, dimensions); builder.setDimension("gcGenSpaceName", name); emitter.emit(builder.build("jvm/gc/mem/max", maxCounter.getLong())); emitter.emit(builder.build("jvm/gc/mem/capacity", capacityCounter.getLong())); emitter.emit(builder.build("jvm/gc/mem/used", usedCounter.getLong())); emitter.emit(builder.build("jvm/gc/mem/init", initCounter.getLong())); } }
void emit(ServiceEmitter emitter, Map<String, String[]> dimensions) { final ServiceMetricEvent.Builder builder = builder(); MonitorUtils.addDimensionsToBuilder(builder, dimensions); long newInvocations = invocationsCounter.getLong(); emitter.emit(builder.build("jvm/gc/count", newInvocations - lastInvocations)); lastInvocations = newInvocations; long newCpuNanos = cpuCounter.getNanos(); emitter.emit(builder.build("jvm/gc/cpu", newCpuNanos - lastCpuNanos)); lastCpuNanos = newCpuNanos; }
void emit(ServiceEmitter emitter, Map<String, String[]> dimensions) { final ServiceMetricEvent.Builder builder = builder(); MonitorUtils.addDimensionsToBuilder(builder, dimensions); long newInvocations = invocationsCounter.getLong(); emitter.emit(builder.build("jvm/gc/count", newInvocations - lastInvocations)); lastInvocations = newInvocations; long newCpuNanos = cpuCounter.getNanos(); emitter.emit(builder.build("jvm/gc/cpu", newCpuNanos - lastCpuNanos)); lastCpuNanos = newCpuNanos; }
void emit(ServiceEmitter emitter, Map<String, String[]> dimensions) { final ServiceMetricEvent.Builder builder = builder(); MonitorUtils.addDimensionsToBuilder(builder, dimensions); long newInvocations = invocationsCounter.getLong(); emitter.emit(builder.build("jvm/gc/count", newInvocations - lastInvocations)); lastInvocations = newInvocations; long newCpuNanos = cpuCounter.getNanos(); emitter.emit(builder.build("jvm/gc/cpu", newCpuNanos - lastCpuNanos)); lastCpuNanos = newCpuNanos; }
void emit(ServiceEmitter emitter, Map<String, String[]> dimensions) { final ServiceMetricEvent.Builder builder = builder(); MonitorUtils.addDimensionsToBuilder(builder, dimensions); long newInvocations = invocationsCounter.getLong(); emitter.emit(builder.build("jvm/gc/count", newInvocations - lastInvocations)); lastInvocations = newInvocations; long newCpuNanos = cpuCounter.getNanos(); emitter.emit(builder.build("jvm/gc/cpu", newCpuNanos - lastCpuNanos)); lastCpuNanos = newCpuNanos; }
void emit(ServiceEmitter emitter, Map<String, String[]> dimensions) { final ServiceMetricEvent.Builder builder = builder(); MonitorUtils.addDimensionsToBuilder(builder, dimensions); long newInvocations = invocationsCounter.getLong(); emitter.emit(builder.build("jvm/gc/count", newInvocations - lastInvocations)); lastInvocations = newInvocations; long newCpuNanos = cpuCounter.getNanos(); emitter.emit(builder.build("jvm/gc/cpu", newCpuNanos - lastCpuNanos)); lastCpuNanos = newCpuNanos; }
void emit(ServiceEmitter emitter, Map<String, String[]> dimensions) { final ServiceMetricEvent.Builder builder = builder(); MonitorUtils.addDimensionsToBuilder(builder, dimensions); builder.setDimension("gcGenSpaceName", name); emitter.emit(builder.build("jvm/gc/mem/max", maxCounter.getLong())); emitter.emit(builder.build("jvm/gc/mem/capacity", capacityCounter.getLong())); emitter.emit(builder.build("jvm/gc/mem/used", usedCounter.getLong())); emitter.emit(builder.build("jvm/gc/mem/init", initCounter.getLong())); } }
void emit(ServiceEmitter emitter, Map<String, String[]> dimensions) { final ServiceMetricEvent.Builder builder = builder(); MonitorUtils.addDimensionsToBuilder(builder, dimensions); builder.setDimension("gcGenSpaceName", name); emitter.emit(builder.build("jvm/gc/mem/max", maxCounter.getLong())); emitter.emit(builder.build("jvm/gc/mem/capacity", capacityCounter.getLong())); emitter.emit(builder.build("jvm/gc/mem/used", usedCounter.getLong())); emitter.emit(builder.build("jvm/gc/mem/init", initCounter.getLong())); } }
void emit(ServiceEmitter emitter, Map<String, String[]> dimensions) { final ServiceMetricEvent.Builder builder = builder(); MonitorUtils.addDimensionsToBuilder(builder, dimensions); builder.setDimension("gcGenSpaceName", name); emitter.emit(builder.build("jvm/gc/mem/max", maxCounter.getLong())); emitter.emit(builder.build("jvm/gc/mem/capacity", capacityCounter.getLong())); emitter.emit(builder.build("jvm/gc/mem/used", usedCounter.getLong())); emitter.emit(builder.build("jvm/gc/mem/init", initCounter.getLong())); } }
void emit(ServiceEmitter emitter, Map<String, String[]> dimensions) { final ServiceMetricEvent.Builder builder = builder(); MonitorUtils.addDimensionsToBuilder(builder, dimensions); builder.setDimension("gcGenSpaceName", name); emitter.emit(builder.build("jvm/gc/mem/max", maxCounter.getLong())); emitter.emit(builder.build("jvm/gc/mem/capacity", capacityCounter.getLong())); emitter.emit(builder.build("jvm/gc/mem/used", usedCounter.getLong())); emitter.emit(builder.build("jvm/gc/mem/init", initCounter.getLong())); } }
JStatData jsd = JStatData.connect(pid); youngGcCnt = (LongCounter) jsd.getAllCounters().get("sun.gc.collector.0.invocations"); ygc = youngGcCnt == null ? 0 : youngGcCnt.getLong(); if (ygc != youngGcCnt.getLong()) { System.out.println("Warning: one or more young collections have occured during sampling."); System.out.println("Use --sample-depth option to reduce time to sample if needed.");