mirror of
https://github.com/square/okhttp.git
synced 2026-01-17 08:42:25 +03:00
Merge pull request #1553 from square/kiran+kenji/add-active
Expose running and queued call counts for monitoring
This commit is contained in:
@@ -177,4 +177,12 @@ public final class Dispatcher {
|
||||
synchronized void finished(Call call) {
|
||||
if (!executedCalls.remove(call)) throw new AssertionError("Call wasn't in-flight!");
|
||||
}
|
||||
|
||||
public synchronized int getRunningCallCount() {
|
||||
return runningCalls.size();
|
||||
}
|
||||
|
||||
public synchronized int getQueuedCallCount() {
|
||||
return readyCalls.size();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user