mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Refactor for query plan capture with initial threshold micros
This commit is contained in:
@@ -72,7 +72,7 @@ public class ServerConfigTest {
|
||||
props.setProperty("enabledL2Regions", "r0,users,orgs");
|
||||
props.setProperty("caseSensitiveCollation", "false");
|
||||
props.setProperty("loadModuleInfo", "true");
|
||||
|
||||
props.setProperty("collectQueryPlanThresholdMicros", "10000");
|
||||
|
||||
serverConfig.loadFromProperties(props);
|
||||
|
||||
@@ -93,6 +93,7 @@ public class ServerConfigTest {
|
||||
assertEquals(PlatformConfig.DbUuid.BINARY, serverConfig.getPlatformConfig().getDbUuid());
|
||||
assertEquals(JsonConfig.DateTime.MILLIS, serverConfig.getJsonDateTime());
|
||||
assertEquals(JsonConfig.Date.MILLIS, serverConfig.getJsonDate());
|
||||
assertEquals(10000, serverConfig.getCollectQueryPlanThresholdMicros());
|
||||
|
||||
assertEquals("r0,users,orgs", serverConfig.getEnabledL2Regions());
|
||||
|
||||
@@ -138,6 +139,7 @@ public class ServerConfigTest {
|
||||
assertEquals(JsonConfig.Date.ISO8601, serverConfig.getJsonDate());
|
||||
assertTrue(serverConfig.getPlatformConfig().isCaseSensitiveCollation());
|
||||
assertFalse(serverConfig.isAutoLoadModuleInfo());
|
||||
assertEquals(Long.MAX_VALUE, serverConfig.getCollectQueryPlanThresholdMicros());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -974,4 +974,9 @@ public class TDSpiEbeanServer implements SpiEbeanServer {
|
||||
public Set<Property> checkUniqueness(Object bean, Transaction transaction) {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SpiQueryBindCapture createQueryBindCapture(SpiQueryPlan queryPlan) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -190,8 +190,9 @@ public class TestCustomerFinder extends BaseTestCase {
|
||||
}
|
||||
|
||||
QueryPlanRequest request = new QueryPlanRequest();
|
||||
|
||||
List<MetaQueryPlan> plans = server().getMetaInfoManager().collectQueryPlans(request);
|
||||
assertThat(plans).isNotEmpty();
|
||||
|
||||
for (MetaQueryPlan plan : plans) {
|
||||
System.out.println(plan);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user