mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Update to the speed test.
This commit is contained in:
parent
2e972fcc9a
commit
18ef4dfec9
1 changed files with 24 additions and 9 deletions
|
@ -31,7 +31,21 @@ import org.eclipse.cdt.internal.core.parser.QuickParseCallback;
|
||||||
*/
|
*/
|
||||||
public class SpeedTest extends TestCase {
|
public class SpeedTest extends TestCase {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
try {
|
||||||
|
new SpeedTest().runTest(1);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void test() throws Exception {
|
public void test() throws Exception {
|
||||||
|
runTest(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void runTest(int n) throws Exception {
|
||||||
|
for (int i = 0; i < n; ++i) {
|
||||||
|
System.gc();
|
||||||
String code =
|
String code =
|
||||||
"#include <windows.h>\n" +
|
"#include <windows.h>\n" +
|
||||||
"#include <stdio.h>\n" +
|
"#include <stdio.h>\n" +
|
||||||
|
@ -42,6 +56,7 @@ public class SpeedTest extends TestCase {
|
||||||
//IScannerInfo info = msvcScannerInfo(quick);
|
//IScannerInfo info = msvcScannerInfo(quick);
|
||||||
testParse(reader, "text", false, info, ParserLanguage.CPP);
|
testParse(reader, "text", false, info, ParserLanguage.CPP);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param path
|
* @param path
|
||||||
|
|
Loading…
Add table
Reference in a new issue