Close
0%
0%

Speed Test

My internet is absolutely terrible, my ISP doesn't believe me. I came up with a solution to show how bad it is.

Similar projects worth following
As I write this, I am downloading at a whopping 10-20KB/s. Don't believe me? Here: http://puu.sh/jyDnj/33277e5fce.png This isn't enough for my ISP to believe me. I came up with a solution to show my ISP just how terrible it is.

So first up, here is the final product: http://analog.io/sAM

This shows just how crappy my internet connection is at the best of times, but when I actually want to use it, after work, congestion at our exchange severely screws my speeds up. I pretty much don't bother anymore.

There are a few different components I used to get this up and running:

  • A powershell script
  • a data stream at: data.sparkfun.com
  • An account at analog.io to produce the pretty graph
  • A scheduled task to automate the process

The powershell script means that this solution is for Windows. This doesn't mean that you can't do it on Mac or Linux, you'll just need to find an alternative way to get the data out of your computer.

Check out the instructions section below to set up your own version!

If you have any questions, feel free to ask them in the comments below, or PM me. Happy either way!



  • 1
    Step 1

    data.sparkfun.com

    First up, lets get a feed set up for our data to get posted into.

    1. Head to data.sparkfun.com
    2. Hit Create
    3. Fill out the Create a Data Stream page with all your details. There is only one box you need to have specific information in. In the Fields box, type speed
    4. Hit Save
    5. You now have your stream! Make sure you keep all of the information on this page, it is crucial! If you lose it, you'll have to start again. You can email the information to yourself down the bottom there if you want.
    6. Click on the Public URL link now, we will have a look at it in the next step.
  • 2
    Step 2

    Powershell script

    Now that you have your account set up, we can get the powershell script running!

    1. Open up a blank text document in your favourite editor. Notepad would do just fine.
    2. Paste the following in:
      $a=Get-Date; 
      Invoke-WebRequest http://client.akamai.com/install/test-objects/10MB.bin|Out-Null; 
      $url = "https://data.sparkfun.com/input/<public key>?private_key=<private key>&speed="+$((10/((Get-Date)-$a).TotalSeconds)*8); 
      Invoke-WebRequest $url|Out-Null;
    3. This may look scary, but its not really! You don't need to understand it, but you do need to update two parts of this script.
      1. Change <public key> to be the 'Public Key' value from your sparkfun data stream
      2. Change <private key> to be the 'Private Key' value from your sparkfun data stream
    4. Save the document as SpeedTest.ps1. Make sure you don't have .txt on the end, this will make your script not work!

    Your script is done! To test it, browse to your script location in Windows Explorer, right click it, and hit 'Run with Powershell'. Depending on how crap your internet is, this will take a little while. When it is done, you should be able to go to your Public URL page on data.sparkfun.com and see a new line that has been added in there.

    Setting up a schedule

    There is already plenty of information on this topic out there on the net, I figure I won't repeat it. I did a quick google search for 'scheduled task powershell script' and the first hit came up as this: http://www.metalogix.com/help/Content Matrix Console/SharePoint Edition/002_HowTo/004_SharePointActions/012_SchedulingPowerShell.htm

    Set the schedule to repeat every 30 minutes, or however often you'd like to report on the data. Please note though, every time you run this script, you download another 10MB. So if you have data limits, take this into consideration! 10MB every half hour adds up to almost 15GB in a month.

  • 3
    Step 3

    Getting that pretty graph

    analog.io is a great little website to take a dataset and get a nice graph out of it.

    1. Head to this website, and create an account.
    2. Click the Import Stream button
    3. Change the host to Sparkfun if it isn't already set
    4. Paste your Public Key into the box provided
    5. You'll get the graph listed right there! Pretty easy huh?
    6. You might also want to claim this stream as your own. Press the Claim button, and paste your Private Key in there. I know you aren't supposed to give it away, but its connection speed data. Can't really go too wrong.

View all 3 instructions

Enjoy this project?

Share

Discussions

Matthew wrote 08/13/2015 at 01:32 point

It may be useful to use http://cachefly.cachefly.net/1mb.test instead? That would knock off 90% of the data usage.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates