ruleDao = new RuleDao();
componentDao = new ComponentDao(System2.INSTANCE);
- session = db.myBatis().openSession(true);
+ session = db.myBatis().openSession(false);
}
@After
@Test
public void extract_issues() throws Exception {
- generateData();
+ insertReferentials();
ProgressTask progressTask = new ProgressTask(counter);
Timer timer = new Timer("Extract Issues");
assertThat(issueDao.synchronizedIssues).isEqualTo(ISSUE_COUNT);
long time = stop - start;
- LOGGER.info("Extracted {} Issues in {} ms with avg {} Issue/second", ISSUE_COUNT, time, documentPerSecond(time));
+ LOGGER.info("Iterated over {} issues in {} ms with avg of {} issues/second", ISSUE_COUNT, time, rowsPerSecond(time));
// assertDurationAround(time, Long.parseLong(getProperty("IssuesDbExtractionTest.extract_issues")));
} finally {
}
}
- private void generateData() {
+ private void insertReferentials() {
long start = System.currentTimeMillis();
for (int i = 0; i < RULES_NUMBER; i++) {
session.commit();
}
}
- LOGGER.info("Generated data in {} ms", System.currentTimeMillis() - start);
+ LOGGER.info("Referentials inserted in {} ms", System.currentTimeMillis() - start);
}
- protected int documentPerSecond(long time) {
+ protected int rowsPerSecond(long time) {
return (int) Math.round(ISSUE_COUNT / (time / 1000.0));
}