Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance enhancements related to issue #772 #775

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
oops, remove the timing
benlamonica committed Aug 5, 2015
commit 2301f920f2acbc7806f77e2d3aec924d074e111f
4 changes: 0 additions & 4 deletions src/main/java/org/testng/TestClass.java
Original file line number Diff line number Diff line change
@@ -120,11 +120,8 @@ public void addInstance(Object instance) {
}

private void initMethods() {
long timeToCreateMethods = System.currentTimeMillis();
ITestNGMethod[] methods = m_testMethodFinder.getTestMethods(m_testClass, m_xmlTest);
m_testMethods = createTestMethods(methods);
System.out.println("Time to create test methods: " + (System.currentTimeMillis() - timeToCreateMethods) + " ms.");
long time = System.currentTimeMillis();
// moving these out of the loops reduces creation time of the methods from 196 seconds to 2 seconds under extreme circumstances
ITestNGMethod[] beforeSuiteMethods = m_testMethodFinder.getBeforeSuiteMethods(m_testClass);
ITestNGMethod[] afterSuiteMethods = m_testMethodFinder.getAfterSuiteMethods(m_testClass);
@@ -188,7 +185,6 @@ private void initMethods() {
false,
instance);
}
System.out.println("time taken to create everything else " + (System.currentTimeMillis() - time) + " ms.");
}

/**