#1238 - Refactor MetaInfoManager - collect query plan stats, fix collection of stats on UpdateQuery

This commit is contained in:
Rob Bygrave
2018-01-19 01:07:37 +13:00
parent b9ae76d465
commit 07cdf64ece
27 changed files with 355 additions and 108 deletions
@@ -8,17 +8,35 @@ import io.ebean.ProfileLocation;
class BasicProfileLocation implements ProfileLocation {
private final String location;
private final String shortDescription;
BasicProfileLocation(String location) {
this.location = location;
this.shortDescription = shortDesc(location);
}
public String toString() {
return "location: " + location;
return shortDescription;
}
public String obtain() {
return location;
}
@Override
public String shortDescription() {
return shortDescription;
}
private String shortDesc(String location) {
int lastPer = location.lastIndexOf('.');
if (lastPer > -1) {
lastPer = location.lastIndexOf('.', lastPer-1);
if (lastPer > -1) {
return location.substring(lastPer+1);
}
}
return location;
}
}