Created
October 20, 2016 21:26
-
-
Save esoxjem/c0797fe65e37adbcdce471a65d0b6814 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SamplingInterceptor implements Interceptor | |
{ | |
@Override | |
public Response intercept(Chain chain) throws IOException | |
{ | |
Request request = chain.request(); | |
DeviceBandwidthSampler.getInstance().startSampling(); | |
Response response = chain.proceed(request); | |
DeviceBandwidthSampler.getInstance().stopSampling(); | |
return response; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Oh hey @NightlyNexus. Thanks!