Commit graph

8 commits

Author SHA1 Message Date
sparky8512
f11b826684 Port recent changes from starlink_grpc.py
This brings the fix for the protocol changes that removed some of the history fields into the JSON version of this module.

I'm really only bothering with this because the script that uses it is mentioned in the project README, which I am in the process of updating.
2021-11-08 19:52:21 -08:00
sparky8512
07389cb0d9 Remove dependence on Python 3.8 or later
statistics.quantiles was not present in Python 3.7 or earlier, which is a problem on Windows if you want to run a binary optimized version of the protobuf package, since those are not currently being posted for Python 3.8 or later.

This change switches to use the weighted median function just with equal weights. It's a bit of overkill, but it also cuts out the mess that was working around deficiencies of the statistics.quantiles implementation.
2021-03-16 13:19:06 -07:00
sparky8512
258a33d62d Port grpc history features to JSON parser script
This brings most of the history-related functionality implemented in the grpc scripts to the JSON version, but only for text output. It also renames parserJsonHistory.py to dish_json_text.py, which removes the last remaining complaint from pylint about module name not conforming to style conventions.

A lot of this is just duplicated code from dish_common and dish_grpc_text, just simplified a little where some of the flexibility wasn't needed.

This removes compatibility with Python 2.7, because I didn't feel like reimplementing statistics.pstdev and didn't think such compatibility was particularly important.
2021-02-21 13:49:45 -08:00
sparky8512
3fafcea882 Fix remaining pylint and yapf nits 2021-01-15 19:27:10 -08:00
sparky8512
a589a75ce5 Revamp error printing
Closes #8
2021-01-12 19:51:38 -08:00
sparky8512
9ccfeb8181 Correct one more int/float mixage
Also, pull the change into the JSON parser for consistency.

Related to issue #12
2021-01-12 11:23:37 -08:00
sparky8512
0ee39f61fd Small change to the interface between parser and calling scripts
Move the "samples" stat out of the ping drop group of stats and into a new general stats group.

This way, it  will make more sense if/when additional stat groups are added, since that stat will apply to all of them.
2021-01-08 19:17:34 -08:00
sparky8512
170dd2daae Reorganize history parsing logic into a separate module
Moves the parsing logic that will be shared by some upcoming scripts out into a separate module.

There's still just as much duplication between the JSON parser and the grpc parser as there was before, but this should at least prevent further duplication of this logic.

This also adds some proper documentation for what each of the stats means.
2021-01-06 11:46:50 -08:00