Skip to content

Commit

Permalink
am 2bffbe7: Merge "Stop logging slow requests outside of debug logs."
Browse files Browse the repository at this point in the history
* commit '2bffbe7eac3c1473e16ef3ef79ad6417f0b76c13':
  Stop logging slow requests outside of debug logs.
  • Loading branch information
Ficus Kirkpatrick authored and Android Git Automerger committed Jul 6, 2015
2 parents 43fdda9 + 2bffbe7 commit 4a1a74e
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/main/java/com/android/volley/Request.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,6 @@ public interface Method {
/** Whether or not a response has been delivered for this request yet. */
private boolean mResponseDelivered = false;

// A cheap variant of request tracing used to dump slow requests.
private long mRequestBirthTime = 0;

/** Threshold at which we should log the request (even when debug logging is not enabled). */
private static final long SLOW_REQUEST_THRESHOLD_MS = 3000;

/** The retry policy for this request. */
private RetryPolicy mRetryPolicy;

Expand Down Expand Up @@ -209,8 +203,6 @@ public Request<?> setRetryPolicy(RetryPolicy retryPolicy) {
public void addMarker(String tag) {
if (MarkerLog.ENABLED) {
mEventLog.add(tag, Thread.currentThread().getId());
} else if (mRequestBirthTime == 0) {
mRequestBirthTime = SystemClock.elapsedRealtime();
}
}

Expand Down Expand Up @@ -241,11 +233,6 @@ public void run() {

mEventLog.add(tag, threadId);
mEventLog.finish(this.toString());
} else {
long requestTime = SystemClock.elapsedRealtime() - mRequestBirthTime;
if (requestTime >= SLOW_REQUEST_THRESHOLD_MS) {
VolleyLog.d("%d ms: %s", requestTime, this.toString());
}
}
}

Expand Down

0 comments on commit 4a1a74e

Please sign in to comment.