Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: james-atkinson/speedcomplainer
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: bschollnick/speedcomplainer
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.

Commits on Feb 6, 2016

  1. Updates

    * Added CSV Headers to CSV Files when they are created.
    * Added ping results, under Darwin (MOSX) to the log file (Packet Loss,
    Min, Avg, Max)
    bschollnick committed Feb 6, 2016
    Copy the full SHA
    63cb077 View commit details
  2. Added better error check with subprocess

    Changed timing to speed test to be every 30 minutes.
    Changed timing on pings to be every 2 minutes.
    Added Sent, and received packet count to ping results.
    bschollnick committed Feb 6, 2016
    Copy the full SHA
    23c8e2e View commit details

Commits on Feb 20, 2016

  1. Updated Gitignore

    Updated Gitignore
    
    * Ignore Disconnects.txt
    * Ignore .pyc
    * Ignore .csv
    * Ignore xlsx
    * Ignore numbers
    * Ignore traceresults.txt
    bschollnick committed Feb 20, 2016
    Copy the full SHA
    658de94 View commit details
  2. Initial Addition of configdata.py

    Configuration file helper module.  Automates the majority of ini file
    reading, into a dictionary structure for ease of use.
    bschollnick committed Feb 20, 2016
    Copy the full SHA
    792a802 View commit details
  3. Initial add of settings.ini

    Replacement for JSON file.
    bschollnick committed Feb 20, 2016
    Copy the full SHA
    6f4d5c6 View commit details
  4. Update of speed complainer

    * Add configdata support
    * Switch ping, trace route, and speed checking values to use values
    from ini file
    * Added header values for csv files
    * Added Tracerouting / MTR / WINMTR support
    bschollnick committed Feb 20, 2016
    Copy the full SHA
    62dd374 View commit details

Commits on Jul 25, 2021

  1. Starting to update for PY3

    Seriously forking from original.
    Switching to Py3, using speedtest module for managing speedtest-cli.
    
    Using pingparsing for managing pinging & parsing of ping command
    
    Expanding data from speedtest (name of server, location of server, human readable rates)
    bschollnick committed Jul 25, 2021
    Copy the full SHA
    abf3255 View commit details

Commits on Jul 26, 2021

  1. add rotating csv functionality

    Update to add Rotating CSVs on a daily basis.  (Need to add INI for directory).
    bschollnick committed Jul 26, 2021
    Copy the full SHA
    af2524c View commit details
  2. Move the unused files to a temporary directory

    They will eventually be deleted.
    bschollnick committed Jul 26, 2021
    Copy the full SHA
    8a59c75 View commit details

Commits on Jul 28, 2021

  1. Add the option to exclude speedtest hosts

    A particular speedtest node locally is reporting ~50% of the download speed.
    
    So I have added a config file option to exclude hosts from reporting.  To do so, add the host's id to the list in the configuration file.
    bschollnick committed Jul 28, 2021
    Copy the full SHA
    d9d7d9a View commit details
  2. Copy the full SHA
    70bd069 View commit details
  3. Update for Traceroute support

    * Changed INI file for traceroute support
    * Change ping header to fix packet loss
    * remove old commented out code
    * Add in doTraceroute function
    * debugged, and implemented traceroute functionality.
    bschollnick committed Jul 28, 2021
    Copy the full SHA
    b083174 View commit details

Commits on Jul 30, 2021

  1. Fixed multiple exclusion hosts in the speedtest configuration file.

    Fixed multiple exclusion hosts in the speedtest configuration file.
    bschollnick committed Jul 30, 2021
    Copy the full SHA
    ebfd368 View commit details
  2. Fix miscalculated runEvery time calculations

    15 minutes != 1800 seconds.
    5 minutes != 500 seconds.
    bschollnick committed Jul 30, 2021
    Copy the full SHA
    a04c8ad View commit details

Commits on Jul 31, 2021

  1. Migrate the traceresults to CSV

    * Move the traceresult file to the data directory
    * Convert it to a CSV to help clean up the display
    bschollnick committed Jul 31, 2021
    Copy the full SHA
    19cd187 View commit details

Commits on Aug 1, 2021

  1. reenable ping logging

    Somehow during the last changes I by accident I commented out ping logging.
    bschollnick committed Aug 1, 2021
    Copy the full SHA
    1f89037 View commit details

Commits on Aug 6, 2021

  1. Added the Ping Datetime & Packet loss to traceroute report, fixed tes…

    …t_results name in exception
    
    1) Added the Ping Date & Time, & Packet loss that triggered the traceroute, to the traceroute report to allow easier back tracking to the ping report.
    
    2) fixed "results" -> test_results variable name in the exception for the speedtest.SpeedtestBestServerFailure check.
    bschollnick committed Aug 6, 2021
    Copy the full SHA
    2c97121 View commit details

Commits on Aug 10, 2021

  1. Copy the full SHA
    76c1b4f View commit details
  2. adding requirements.txt

    bschollnick committed Aug 10, 2021
    Copy the full SHA
    c9ccf28 View commit details
  3. Copy the full SHA
    f705e22 View commit details
  4. clean up requirements

    bschollnick committed Aug 10, 2021
    Copy the full SHA
    5c8d184 View commit details
  5. Update csv_common.py

    bschollnick committed Aug 10, 2021
    Copy the full SHA
    1b56116 View commit details

Commits on Sep 17, 2021

  1. Copy the full SHA
    8eea080 View commit details

Commits on Sep 25, 2021

  1. documentation updates

    bschollnick committed Sep 25, 2021
    Copy the full SHA
    66e793e View commit details

Commits on Dec 9, 2022

  1. Bump certifi from 2021.5.30 to 2022.12.7

    Bumps [certifi](https://github.com/certifi/python-certifi) from 2021.5.30 to 2022.12.7.
    - [Release notes](https://github.com/certifi/python-certifi/releases)
    - [Commits](certifi/python-certifi@2021.05.30...2022.12.07)
    
    ---
    updated-dependencies:
    - dependency-name: certifi
      dependency-type: direct:production
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Dec 9, 2022
    Copy the full SHA
    4737f1e View commit details
  2. Merge pull request #1 from bschollnick/dependabot/pip/certifi-2022.12.7

    Bump certifi from 2021.5.30 to 2022.12.7
    bschollnick authored Dec 9, 2022
    Copy the full SHA
    1a79324 View commit details
Binary file added .DS_Store
Binary file not shown.
71 changes: 71 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '25 23 * * 6'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
.idea

*.pyc

*.csv

disconnects.txt

*.xlsx

*.numbers

traceresults.txt

tracerouteparser.py
.DS_Store
.DS_Store
.DS_Store
5 changes: 2 additions & 3 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"twitter": {
{ "twitter": {
"twitterToken": "",
"twitterConsumerKey": "",
"twitterTokenSecret": "",
@@ -24,7 +23,7 @@
"type": "csv",
"files": {
"ping": "pingresults.csv",
"speed": "speedrestuls.csv"
"speed": "speedresults.csv"
}
}
}
117 changes: 117 additions & 0 deletions configdata.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# coding: utf-8
"""
:Module: Config
:Date: 2015-05-1
:Platforms: Mac, Windows, Unix (Tested under Mac OS X)
:Version: 1
:Authors:
- Benjamin Schollnick
:Description:
This module will read in the configuration ini.
**Modules Used (Batteries Included)**:
* os
* os.path
* stat
* string
* time
:Concept:
While not ideal, INI based configuration files, are easy to debug,
and more important, easy to update.
The module is passed the location of the configuration files,
and will read in the necessary ini files (settings.ini by default).
The different segments of the ini file will be stored in a seperate
dictionary for ease of use..
code::
load_data(<fqfn>)
print config.configdata["USER"]
print config.configdata["EMAIL"]
"""
#####################################################
# Batteries Included imports
from __future__ import absolute_import
from __future__ import print_function
#import six.moves.configparser
import configparser
from configparser import ConfigParser
import os
import os.path
import sys
import fastnumbers

#####################################################
# 3rd party imports
#
# None

configdata = {}

def load_data(filename=None, ini_group=""):
"""
:Description:
Load data from the ini file
Args:
filename: (default value = None) To override the filename
pass a string containing the new filename.
oname: The option name to read from the ini
Returns:
loaded dictionary
code::
USER = load_user_data(settings_file)
EMAIL = load_email_data(settings_file)
"""
if filename is None:
filename = "settings.ini"

try:
# config = six.moves.configparser.SafeConfigParser()
config = configparser.SafeConfigParser()
config.read(filename)
for section in config.sections():
#print("Section : ",section)
sname = section.strip()
configdata[sname]={}
for option_name in config.options(section.strip()):
value = config.get(sname, option_name).split(",")
if len(value) == 1:
if (option_name.endswith("_path") or
option_name.endswith("_filename")):
# print (option_name)
value[0] = os.path.abspath(value[0])
configdata[sname][option_name] = fastnumbers.fast_int(value[0])
else:
configdata[sname][option_name] = []
for cleanvalue in value:
if (option_name.endswith("_path") or
option_name.endswith("_filename")):
cleanvalue = os.path.abspath(cleanvalue)
configdata[sname][option_name].append(cleanvalue.strip())
# except six.moves.configparser.NoSectionError:
except configparser.NoSectionError:
print("Error reading %s" % filename)

if __name__ == "__main__":
load_data()
#load_config_data()
# print "User - %s\n" % USER
# print "Email - %s\n" % EMAIL
# print "NYSIIS - %s\n" % NYSIIS
# print "CONFLUENCE - %s\n" % CONFLUENCE

for x in configdata.keys():
print(x, configdata[x])
Loading