mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-23 23:13:55 +00:00
#1854 - Use profile location label to automatically give good metric name for @Transactional (with profile location enhancement)
This commit is contained in:
1 parent
7d77df58c5
commit
affd720390
7 files changed
+41
-7
No files matched your search
@@ -10,7 +10,7 @@ class DTimeMetricStats implements TimedMetricStats {
|
||||
|
||||
private final MetricType metricType;
|
||||
|
||||
private final String name;
|
||||
private String name;
|
||||
|
||||
private String location;
|
||||
|
||||
@@ -39,9 +39,6 @@ class DTimeMetricStats implements TimedMetricStats {
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (location != null) {
|
||||
sb.append("loc:").append(location).append(" ");
|
||||
}
|
||||
if (name != null) {
|
||||
sb.append("name:").append(name).append(" ");
|
||||
}
|
||||
@@ -49,6 +46,9 @@ class DTimeMetricStats implements TimedMetricStats {
|
||||
.append(" total:").append(total)
|
||||
.append(" max:").append(max)
|
||||
.append(" beanCount:").append(beanCount);
|
||||
if (location != null) {
|
||||
sb.append(" loc:").append(location);
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@@ -57,6 +57,11 @@ class DTimeMetricStats implements TimedMetricStats {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MetricType getMetricType() {
|
||||
return metricType;
|
||||
|
||||
Reference in new issue
Block a user