use of com.tagtraum.perf.gcviewer.model.GCResource in project GCViewer by chewiebug.
the class GcSeriesLoader method determineStartTimePerGcModel.
private Map<Timestamp, GCModel> determineStartTimePerGcModel(GcResourceSeries series) throws DataReaderException {
Map<Timestamp, GCModel> startTimeToGcModel = new HashMap<>();
for (GCResource resource : series.getResourcesInOrder()) {
Optional<GCModel> model = loadGcModel(resource);
if (model.isPresent()) {
Timestamp timeStamp = getCreationDate(model.get());
startTimeToGcModel.put(timeStamp, model.get());
} else {
logger.log(Level.WARNING, "Failed to load " + resource + " - ignoring it");
}
}
return startTimeToGcModel;
}
use of com.tagtraum.perf.gcviewer.model.GCResource in project GCViewer by chewiebug.
the class GCModelLoaderControllerImpl method add.
@Override
public void add(File[] files) {
List<GCResource> gcResourceList = new ArrayList<>();
for (File file : files) {
GCResource gcResource = new GcResourceFile(file.getAbsolutePath());
gcResourceList.add(gcResource);
addGCResource(gcResource);
}
getRecentGCResourcesModel().add(gcResourceList);
}
use of com.tagtraum.perf.gcviewer.model.GCResource in project GCViewer by chewiebug.
the class GCModelLoaderControllerImpl method add.
@Override
public void add(List<GCResource> gcResourceList) {
for (GCResource gcResource : gcResourceList) {
gcResource.reset();
addGCResource(gcResource);
}
getRecentGCResourcesModel().add(gcResourceList);
}
use of com.tagtraum.perf.gcviewer.model.GCResource in project GCViewer by chewiebug.
the class GCModelLoaderControllerImpl method reload.
@Override
public GCModelLoaderGroupTracker reload(GCDocument gcDocument) {
GCModelLoaderGroupTracker tracker = new GCModelLoaderGroupTrackerImpl();
for (GCResource gcResource : gcDocument.getGCResources()) {
if (gcResource.hasUnderlyingResourceChanged()) {
gcResource.reset();
gcResource.setIsReload(true);
GCModelLoader loader = GCModelLoaderFactory.createFor(gcResource);
GCDocumentController docController = getDocumentController(gcDocument);
docController.reloadGCResource(loader);
tracker.addGcModelLoader(loader);
}
}
tracker.execute();
return tracker;
}
use of com.tagtraum.perf.gcviewer.model.GCResource in project GCViewer by chewiebug.
the class GCModelLoaderControllerImpl method open.
@Override
public void open(File[] files) {
List<GCResource> gcResourceList = new ArrayList<GCResource>();
for (File file : files) {
GCResource gcResource = new GcResourceFile(file.getAbsolutePath());
gcResourceList.add(gcResource);
}
open(gcResourceList);
}
Aggregations