private void build(String msg, String resource, boolean showResults) throws DroolsParserException,
IOException {
final KnowledgeBuilderImpl builder = new KnowledgeBuilderImpl();
long start = System.currentTimeMillis();
builder.addPackageFromDrl( new InputStreamReader( getClass().getResourceAsStream( resource ) ) );
InternalKnowledgePackage pkg = builder.getPackage();
assertFalse(builder.hasErrors());
assertNotNull(pkg);
if (showResults) {
System.out.print( "Time taken for " + msg + " : " + (System.currentTimeMillis() - start) );