use of org.apache.geode.internal.SystemAdmin.StatSpec in project geode by apache.
the class StatUtils method addResourceInstsToSet.
private static void addResourceInstsToSet(final File archiveFile, final String specString, final Set<ResourceInst> resourceInsts) throws IOException {
StatSpec statSpec = new StatSpec(specString);
StatArchiveReader reader = new StatArchiveReader(new File[] { archiveFile }, new StatSpec[] { statSpec }, true);
StatValue[] statValues = reader.matchSpec(statSpec);
for (StatValue statValue : statValues) {
for (ResourceInst resourceInst : statValue.getResources()) {
resourceInsts.add(resourceInst);
}
}
}
use of org.apache.geode.internal.SystemAdmin.StatSpec in project geode by apache.
the class StatArchiveWithConsecutiveResourceInstIntegrationTest method setUp.
@Before
public void setUp() throws Exception {
URL url = getClass().getResource(ARCHIVE_FILE_NAME);
this.archiveFile = this.temporaryFolder.newFile(ARCHIVE_FILE_NAME);
FileUtils.copyURLToFile(url, archiveFile);
this.statSpec = new StatSpec(STATS_SPEC_STRING);
// precondition
assertThat(this.archiveFile).exists();
}
Aggregations