Skip to content

Commit 2448926

Browse files
committed
update constructor
1 parent e4c1324 commit 2448926

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

presto-common/src/main/java/com/facebook/presto/common/RuntimeMetric.java

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -242,18 +242,7 @@ public static RuntimeMetric copyOf(RuntimeMetric metric)
242242
return copy;
243243
}
244244

245-
/**
246-
* Creates a RuntimeMetric with pre-existing aggregate values (for backward compatibility).
247-
* This constructor is useful for creating metrics from stored/serialized aggregate data
248-
* or in tests where you need to set specific values without percentile tracking.
249-
*
250-
* @param name Name of this metric
251-
* @param unit Unit of this metric
252-
* @param sum Sum of all values
253-
* @param count Count of values
254-
* @param max Maximum value
255-
* @param min Minimum value
256-
*/
245+
@ThriftConstructor
257246
public RuntimeMetric(String name, RuntimeUnit unit, long sum, long count, long max, long min)
258247
{
259248
this.name = requireNonNull(name, "name is null");
@@ -266,7 +255,6 @@ public RuntimeMetric(String name, RuntimeUnit unit, long sum, long count, long m
266255
}
267256

268257
@JsonCreator
269-
@ThriftConstructor
270258
public RuntimeMetric(
271259
@JsonProperty("name") String name,
272260
@JsonProperty("unit") RuntimeUnit unit,
@@ -489,7 +477,6 @@ public RuntimeUnit getUnit()
489477
* @return The number of buckets, or default value if not explicitly configured
490478
*/
491479
@JsonProperty
492-
@ThriftField(7)
493480
public int getNumBuckets()
494481
{
495482
return numBuckets;
@@ -502,7 +489,6 @@ public int getNumBuckets()
502489
* @return The bucket width in the metric's native unit scale
503490
*/
504491
@JsonProperty
505-
@ThriftField(8)
506492
public long getBucketWidth()
507493
{
508494
return bucketWidth;
@@ -512,7 +498,6 @@ public long getBucketWidth()
512498
* Get the 90th percentile (null if percentile tracking not enabled).
513499
*/
514500
@JsonProperty
515-
@ThriftField(9)
516501
public Long getP90()
517502
{
518503
if (!percentileTrackingEnabled) {
@@ -530,7 +515,6 @@ public Long getP90()
530515
* Get the 95th percentile (null if percentile tracking not enabled).
531516
*/
532517
@JsonProperty
533-
@ThriftField(10)
534518
public Long getP95()
535519
{
536520
if (!percentileTrackingEnabled) {
@@ -548,7 +532,6 @@ public Long getP95()
548532
* Get the 99th percentile (null if percentile tracking not enabled).
549533
*/
550534
@JsonProperty
551-
@ThriftField(11)
552535
public Long getP99()
553536
{
554537
if (!percentileTrackingEnabled) {

0 commit comments

Comments
 (0)