Skip to content

Commit fd6224a

Browse files
Vishwa Prakash Gayasenfacebook-github-bot
authored andcommitted
Add offloop metrics to ThriftServerStats
Summary: - Thrift java applications extensively use offloop threads - It is difficult to quickly triage saturation of offloop threads - OffLoopScheduler already has a helper which provides these stats - Adding these stats to standard thrift server metrics so these will be available by default to all thrift servers Reviewed By: avalonalex Differential Revision: D52928066 fbshipit-source-id: d7449a0bab8d9b4f7b4457657d45967cacedb95b
1 parent 6bbbde3 commit fd6224a

File tree

1 file changed

+4
-0
lines changed
  • third-party/thrift/src/thrift/lib/java/runtime/src/main/java/com/facebook/swift/service/stats

1 file changed

+4
-0
lines changed

third-party/thrift/src/thrift/lib/java/runtime/src/main/java/com/facebook/swift/service/stats/ServerStats.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package com.facebook.swift.service.stats;
1818

1919
import com.facebook.nifty.core.NiftyMetrics;
20+
import com.facebook.thrift.util.resources.RpcResources;
2021
import io.airlift.stats.DecayCounter;
2122
import io.airlift.stats.Distribution;
2223
import io.airlift.stats.ExponentialDecay;
@@ -269,6 +270,9 @@ public Map<String, Long> getCounters() {
269270
(key, value) -> {
270271
counters.put(THRIFT + key, Math.round(value.getAvg()));
271272
});
273+
274+
// Add counters for the off loop scheduler
275+
counters.putAll(RpcResources.getOffLoopSchedulerStats());
272276
return counters;
273277
}
274278

0 commit comments

Comments
 (0)