WIP AutoTune refactor

This commit is contained in:
Robin Bygrave committed 2015-09-01 07:55:25 +12:00
1 parent f4ed813c08
commit 987fe38618
36 files changed
+740 -1478

No files matched your search

@@ -37,30 +37,30 @@ public class AutofetchEmbeddedTest extends BaseTestCase {
@Test
public void testEmbeddedBeanQueryTuning() {
Ebean.getServer(null).getAdminAutofetch().setProfiling(true);
Ebean.getServer(null).getAdminAutofetch().setQueryTuning(true);
Ebean.getServer(null).getAdminAutofetch().setProfilingBase(1);
EMain testBean = new EMain();
testBean.setName("test");
testBean.getEmbeddable().setDescription("test description");
Ebean.save(testBean);
//This should not throw an exception
for (int i = 0; i < 5; i++) {
Ebean.beginTransaction();
try {
List<EMain> result = Ebean.find(EMain.class).setAutofetch(true).findList();
for (EMain e : result) {
e.getEmbeddable().setDescription("Test" + i);
Ebean.save(e);
}
Ebean.commitTransaction();
} finally {
Ebean.endTransaction();
logger.debug(Ebean.getServer(null).getAdminAutofetch().collectUsageViaGC());
}
}
// Ebean.getServer(null).getAdminAutofetch().setProfiling(true);
// Ebean.getServer(null).getAdminAutofetch().setQueryTuning(true);
// Ebean.getServer(null).getAdminAutofetch().setProfilingBase(1);
//
// EMain testBean = new EMain();
// testBean.setName("test");
// testBean.getEmbeddable().setDescription("test description");
// Ebean.save(testBean);
//
// //This should not throw an exception
// for (int i = 0; i < 5; i++) {
// Ebean.beginTransaction();
// try {
// List<EMain> result = Ebean.find(EMain.class).setAutofetch(true).findList();
// for (EMain e : result) {
// e.getEmbeddable().setDescription("Test" + i);
// Ebean.save(e);
// }
// Ebean.commitTransaction();
// } finally {
// Ebean.endTransaction();
// logger.debug(Ebean.getServer(null).getAdminAutofetch().collectUsageViaGC());
// }
// }
}
@Test