use of com.tagtraum.perf.gcviewer.model.GCResource in project GCViewer by chewiebug.
the class GCResourceGroup method getGCResourceList.
/**
* Get all resources names as an array of strings.
*
* @return resource names as array of strings
*/
public List<GCResource> getGCResourceList() {
List<GCResource> resources = new ArrayList<>();
for (String entry : gcResourceList) {
GCResource resource = getGcResource(entry);
resources.add(resource);
}
return resources;
}
use of com.tagtraum.perf.gcviewer.model.GCResource in project GCViewer by chewiebug.
the class RecentGCResourcesModel method getResourceNamesStartingWith.
public List<String> getResourceNamesStartingWith(String start) {
List<String> result = new ArrayList<>();
for (GCResource gcResource : allResources) {
if (gcResource.getResourceName().startsWith(start)) {
result.add(gcResource.getResourceName());
}
}
Collections.sort(result);
return result;
}
use of com.tagtraum.perf.gcviewer.model.GCResource in project GCViewer by chewiebug.
the class TestGCModelLoaderController method open_GcResourceSeries.
@Test
public void open_GcResourceSeries() throws Exception {
List<GCResource> resources = getGcResourcesForSeries();
GCResource series = new GcResourceSeries(resources);
controller.open(series);
assertThat(getOpenResources(), contains(series));
}
use of com.tagtraum.perf.gcviewer.model.GCResource in project GCViewer by chewiebug.
the class TestGCModelLoaderController method open_GcResourceFile.
@Test
public void open_GcResourceFile() throws Exception {
GCResource resource = new GcResourceFile(UnittestHelper.getResourceAsString(UnittestHelper.FOLDER_OPENJDK, "SampleSun1_6_0CMS.txt"));
controller.open(resource);
assertThat(getOpenResources(), contains(resource));
}
use of com.tagtraum.perf.gcviewer.model.GCResource in project GCViewer by chewiebug.
the class TestGCViewerArgsParser method onlyGcLogSeries.
@Test
public void onlyGcLogSeries() throws Exception {
String[] args = { "some_gc.log.0;some_gc.log.1;some_gc.log.2" };
GCViewerArgsParser gcViewerArgsParser = new GCViewerArgsParser();
gcViewerArgsParser.parseArguments(args);
assertEquals(gcViewerArgsParser.getArgumentCount(), 1);
List<GCResource> resources = Arrays.asList(new GcResourceFile("some_gc.log.0"), new GcResourceFile("some_gc.log.1"), new GcResourceFile("some_gc.log.2"));
assertEquals(gcViewerArgsParser.getGcResource(), new GcResourceSeries(resources));
assertEquals(gcViewerArgsParser.getType(), DataWriterType.SUMMARY);
}
Aggregations