From the wikipedia:
Net neutrality is the principle that Internet service providers and governments regulating the Internet should treat all data on the Internet the same, not discriminating or charging differentially by user, content, website, platform, application, type of attached equipment, or mode of communication.
Your task is to find if your internet connection is being throttled by your ISP or if the net is neutral.
What you actually have to do
Your program or function will be run twice. It needs to have some form of memory or storage between its two calls, like writing to a file, a
static var in C++, setting a property on a function in JS, or just a global variable.
It must record the time it took google.com to respond*, and the time it took the other website to respond*.
The second time it is run, it must do the above, and print a truthy value if these are both true:
- The response time between google.com the first and second time varied by less than 5%. (Google paid ISP to not throttle)
- The response time between the other site the first and second time increased by more than 50%. (Other site didn't)
Shortest code wins!
* The time it to get the response body, headers, or just connect with the server. You choose.