Java Code Examples for jdk.jfr.Recording#getMaxSize()
The following examples show how to use
jdk.jfr.Recording#getMaxSize() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DCmdCheck.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
private void printGeneral(Recording recording) { String format = "Recording: recording=%d name=\"%s\""; print(format, recording.getId(), recording.getName()); Duration duration = recording.getDuration(); if (duration != null) { print(" duration="); printTimespan(duration, ""); } long maxSize = recording.getMaxSize(); if (maxSize != 0) { print(" maxsize="); printBytes(maxSize, ""); } Duration maxAge = recording.getMaxAge(); if (maxAge != null) { print(" maxage="); printTimespan(maxAge, ""); } print(" (" + recording.getState().toString().toLowerCase() + ")"); println(); }
Example 2
Source File: RecordingInfo.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
RecordingInfo(Recording recording) { id = recording.getId(); name = recording.getName(); state = recording.getState().toString(); dumpOnExit = recording.getDumpOnExit(); size = recording.getSize(); disk = recording.isToDisk(); Duration d = recording.getMaxAge(); if (d == null) { maxAge = 0; } else { maxAge = d.getSeconds(); } maxSize = recording.getMaxSize(); Instant s = recording.getStartTime(); startTime = s == null ? 0L : s.toEpochMilli(); Instant st = recording.getStopTime(); stopTime = st == null ? 0L : st.toEpochMilli(); Path p = recording.getDestination(); destination = p == null ? null : p.toString(); Duration duration = recording.getDuration(); durationInSeconds = duration == null ? 0 : duration.getSeconds(); settings = recording.getSettings(); }
Example 3
Source File: DCmdCheck.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
private void printGeneral(Recording recording) { print("Recording " + recording.getId() + ": name=" + recording.getName()); Duration duration = recording.getDuration(); if (duration != null) { print(" duration="); printTimespan(duration, ""); } long maxSize = recording.getMaxSize(); if (maxSize != 0) { print(" maxsize="); print(Utils.formatBytesCompact(maxSize)); } Duration maxAge = recording.getMaxAge(); if (maxAge != null) { print(" maxage="); printTimespan(maxAge, ""); } print(" (" + recording.getState().toString().toLowerCase() + ")"); println(); }
Example 4
Source File: RecordingInfo.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
RecordingInfo(Recording recording) { id = recording.getId(); name = recording.getName(); state = recording.getState().toString(); dumpOnExit = recording.getDumpOnExit(); size = recording.getSize(); disk = recording.isToDisk(); Duration d = recording.getMaxAge(); if (d == null) { maxAge = 0; } else { maxAge = d.getSeconds(); } maxSize = recording.getMaxSize(); Instant s = recording.getStartTime(); startTime = s == null ? 0L : s.toEpochMilli(); Instant st = recording.getStopTime(); stopTime = st == null ? 0L : st.toEpochMilli(); Path p = recording.getDestination(); destination = p == null ? null : p.toString(); Duration duration = recording.getDuration(); durationInSeconds = duration == null ? 0 : duration.getSeconds(); settings = recording.getSettings(); }
Example 5
Source File: DCmdCheck.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
private void printGeneral(Recording recording) { print("Recording " + recording.getId() + ": name=" + recording.getName()); Duration duration = recording.getDuration(); if (duration != null) { print(" duration="); printTimespan(duration, ""); } long maxSize = recording.getMaxSize(); if (maxSize != 0) { print(" maxsize="); print(Utils.formatBytesCompact(maxSize)); } Duration maxAge = recording.getMaxAge(); if (maxAge != null) { print(" maxage="); printTimespan(maxAge, ""); } print(" (" + recording.getState().toString().toLowerCase() + ")"); println(); }
Example 6
Source File: RecordingInfo.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
RecordingInfo(Recording recording) { id = recording.getId(); name = recording.getName(); state = recording.getState().toString(); dumpOnExit = recording.getDumpOnExit(); size = recording.getSize(); disk = recording.isToDisk(); Duration d = recording.getMaxAge(); if (d == null) { maxAge = 0; } else { maxAge = d.getSeconds(); } maxSize = recording.getMaxSize(); Instant s = recording.getStartTime(); startTime = s == null ? 0L : s.toEpochMilli(); Instant st = recording.getStopTime(); stopTime = st == null ? 0L : st.toEpochMilli(); Path p = recording.getDestination(); destination = p == null ? null : p.toString(); Duration duration = recording.getDuration(); durationInSeconds = duration == null ? 0 : duration.getSeconds(); settings = recording.getSettings(); }
Example 7
Source File: FlightRecorderMXBeanImpl.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
@Override public Map<String, String> getRecordingOptions(long recording) throws IllegalArgumentException { MBeanUtils.checkMonitor(); Recording r = getExistingRecording(recording); Map<String, String> options = new HashMap<>(10); options.put(OPTION_DUMP_ON_EXIT, String.valueOf(r.getDumpOnExit())); options.put(OPTION_DISK, String.valueOf(r.isToDisk())); options.put(OPTION_NAME, String.valueOf(r.getName())); options.put(OPTION_MAX_AGE, ManagementSupport.formatTimespan(r.getMaxAge(), " ")); Long maxSize = r.getMaxSize(); options.put(OPTION_MAX_SIZE, String.valueOf(maxSize == null ? "0" : maxSize.toString())); options.put(OPTION_DURATION, ManagementSupport.formatTimespan(r.getDuration(), " ")); return options; }
Example 8
Source File: FlightRecorderMXBeanImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@Override public Map<String, String> getRecordingOptions(long recording) throws IllegalArgumentException { MBeanUtils.checkMonitor(); Recording r = getExistingRecording(recording); Map<String, String> options = new HashMap<>(10); options.put(OPTION_DUMP_ON_EXIT, String.valueOf(r.getDumpOnExit())); options.put(OPTION_DISK, String.valueOf(r.isToDisk())); options.put(OPTION_NAME, String.valueOf(r.getName())); options.put(OPTION_MAX_AGE, ManagementSupport.formatTimespan(r.getMaxAge(), " ")); Long maxSize = r.getMaxSize(); options.put(OPTION_MAX_SIZE, String.valueOf(maxSize == null ? "0" : maxSize.toString())); options.put(OPTION_DURATION, ManagementSupport.formatTimespan(r.getDuration(), " ")); return options; }
Example 9
Source File: FlightRecorderMXBeanImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
@Override public Map<String, String> getRecordingOptions(long recording) throws IllegalArgumentException { MBeanUtils.checkMonitor(); Recording r = getExistingRecording(recording); Map<String, String> options = new HashMap<>(10); options.put(OPTION_DUMP_ON_EXIT, String.valueOf(r.getDumpOnExit())); options.put(OPTION_DISK, String.valueOf(r.isToDisk())); options.put(OPTION_NAME, String.valueOf(r.getName())); options.put(OPTION_MAX_AGE, ManagementSupport.formatTimespan(r.getMaxAge(), " ")); Long maxSize = r.getMaxSize(); options.put(OPTION_MAX_SIZE, String.valueOf(maxSize == null ? "0" : maxSize.toString())); options.put(OPTION_DURATION, ManagementSupport.formatTimespan(r.getDuration(), " ")); return options; }