use of org.gridkit.jvmtool.stacktrace.ThreadSnapshot in project jvm-tools by aragozin.
the class FilterParserCorpusTest method verify.
@Test
public void verify() throws FileNotFoundException, IOException {
ThreadSnapshotFilter f = TraceFilterPredicateParser.parseFilter(filter, new CachingFilterFactory());
StackTraceReader reader = StackTraceCodec.newReader(new FileInputStream("src/test/resources/jboss-10k.std"));
int n = 0;
if (!reader.isLoaded()) {
reader.loadNext();
}
ThreadSnapshot readerProxy = new ReaderProxy(reader);
while (reader.isLoaded()) {
if (f.evaluate(readerProxy)) {
++n;
}
if (!reader.loadNext()) {
break;
}
}
Assert.assertEquals(matchCount, n);
}
Aggregations