01: /*
02: * Copyright (C) 1999-2004 <A href="http://www-ist.massey.ac.nz/JBDietrich" target="_top">Jens Dietrich</a>
03: *
04: * This library is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU Lesser General Public
06: * License as published by the Free Software Foundation; either
07: * version 2 of the License, or (at your option) any later version.
08: *
09: * This library is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12: * Lesser General Public License for more details.
13: *
14: * You should have received a copy of the GNU Lesser General Public
15: * License along with this library; if not, write to the Free Software
16: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17: */
18: package test.org.mandarax.performance;
19:
20: import java.io.PrintStream;
21:
22: import org.mandarax.kernel.InferenceEngine;
23:
24: /**
25: * Interface for performance tests.
26: * @author <A href="http://www-ist.massey.ac.nz/JBDietrich" target="_top">Jens Dietrich</A>
27: * @version 3.4 <7 March 05>
28: * @since 2.1
29: */
30: public interface PerformanceTest {
31: public static final String QUERY_VARIABLE = "query_var";
32:
33: /**
34: * Run the test.
35: * @param ie the inference engine to be tested
36: * @param one whether to return only one result, or all results
37: * @param logOn whether to log or not
38: * @param out print stream used to output a test summary
39: */
40: public void run(InferenceEngine ie, boolean one, boolean logOn,
41: PrintStream out);
42:
43: /**
44: * Get the size of the knowledge base used.
45: * @return the kb size
46: */
47: public int getKBSize();
48:
49: /**
50: * Release the test.
51: */
52: public void release();
53:
54: /**
55: * Get the time needed to run the test.
56: * @param a long value (the millis)
57: */
58: public long getTime();
59:
60: /**
61: * Get the number of results computed.
62: * @param the number of results
63: */
64: public int getNumberOfResults();
65:
66: /**
67: * Get the tree depth (if kb is organized as tree, otherwise just return -1).
68: * @return the depth of the kb tree
69: */
70: public int getDepth();
71:
72: }
|