Skip to content

Commit

Permalink
Change query profile collector field data types to primitives and add…
Browse files Browse the repository at this point in the history
… more tests

Signed-off-by: Ticheng Lin <ticheng@amazon.com>
  • Loading branch information
ticheng-aws committed Jun 7, 2023
1 parent 38e4093 commit e5f293c
Show file tree
Hide file tree
Showing 3 changed files with 281 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,22 +98,22 @@ public class CollectorResult implements ToXContentObject, Writeable {
/**
* The total elapsed time in reduce phase for this CollectorManager
*/
private final Long reduceTime;
private final long reduceTime;

/**
* The maximum slice time for this CollectorManager
*/
private final Long maxSliceTime;
private final long maxSliceTime;

/**
* The minimum slice time for this CollectorManager
*/
private final Long minSliceTime;
private final long minSliceTime;

/**
* The average slice time for this CollectorManager
*/
private final Long avgSliceTime;
private final long avgSliceTime;

/**
* The segment slice count for this CollectorManager
Expand All @@ -125,18 +125,18 @@ public class CollectorResult implements ToXContentObject, Writeable {
*/
private List<CollectorResult> children;

public CollectorResult(String collectorName, String reason, Long time, List<CollectorResult> children) {
public CollectorResult(String collectorName, String reason, long time, List<CollectorResult> children) {
this(collectorName, reason, time, 0L, time, time, time, 1, children);
}

public CollectorResult(
String collectorName,
String reason,
Long time,
Long reduceTime,
Long maxSliceTime,
Long minSliceTime,
Long avgSliceTime,
long time,
long reduceTime,
long maxSliceTime,
long minSliceTime,
long avgSliceTime,
int sliceCount,
List<CollectorResult> children
) {
Expand Down Expand Up @@ -235,7 +235,7 @@ public long getAvgSliceTime() {
/**
* @return the profiled segment slice count for this collector manager (inclusive of children)
*/
public long getSliceCount() {
public int getSliceCount() {
return this.sliceCount;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,19 @@ public long getTime() {
return time;
}

public Long getReduceTime() {
public long getReduceTime() {
return reduceTime;
}

public Long getMaxSliceTime() {
public long getMaxSliceTime() {
return maxSliceTime;
}

public Long getMinSliceTime() {
public long getMinSliceTime() {
return minSliceTime;
}

public Long getAvgSliceTime() {
public long getAvgSliceTime() {
return avgSliceTime;
}

Expand Down
Loading

0 comments on commit e5f293c

Please sign in to comment.