Skip to content

Commit

Permalink
test changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Gagan Juneja committed May 6, 2024
1 parent 9df5cdd commit 6774aff
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,11 @@ public String getChannelType() {
@Override
public void sendResponse(TransportResponse response) throws IOException {
if (throughputCounter != null) {
LOG.info("Updating the counter inside PATransportChannel");
long updatedValue = ManagementFactory.getThreadMXBean().getCurrentThreadCpuTime()
- startCpuTimeNanos;
LOG.info("Updating the counter inside PATransportChannel {}", updatedValue);
throughputCounter.add(
Math.max(
ManagementFactory.getThreadMXBean().getCurrentThreadCpuTime()
- startCpuTimeNanos,
0),
Math.max(updatedValue, 0),
Tags.create().addTag("indexName", indexName).addTag("shardId", shardId));
}
emitMetricsFinish(null);
Expand Down

0 comments on commit 6774aff

Please sign in to comment.