Created
May 5, 2015 02:31
-
-
Save adeekshith/ed1b319db84dc0d4972d to your computer and use it in GitHub Desktop.
Simple website monitoring script in Mathematica to monitor and visualize any given website performance over time.
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
(* Monitors given website load time and plots it *) | |
dataLength = 400; | |
timeTakenUrlReq := | |
First@AbsoluteTiming[Import["http://google.com/"]]; | |
timeTakenTime := {DateList[], timeTakenUrlReq}; | |
data = {timeTakenTime}; | |
Dynamic[Last[AppendTo[data, timeTakenTime]], UpdateInterval -> 10, | |
TrackedSymbols -> {}] | |
Dynamic[If[Length[data] < dataLength, Length[data = data], | |
Length[data = data[[-dataLength ;;]]]]] | |
Dynamic[DateListPlot[data, Joined -> True, ImageSize -> Full, | |
ClippingStyle -> Automatic, Filling -> Bottom, PlotTheme -> "Web", | |
PlotRange -> Full], SynchronousUpdating -> False] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment