Giter VIP home page Giter VIP logo

ping-graph-tool's People

Stargazers

 avatar

Watchers

 avatar

Forkers

ganxueliang88

ping-graph-tool's Issues

Don't forget data when changing history length

It can be quite unpractical when the program forgets all the data when you reduce the data depth to the minimum of 100 entries. Instead the maximum depth of 10 000 entries should always be remembered and a subset of the entries should be used when graphing the ping and calculating the stats.

This way one can for example quickly check the average ping over the last 2.7 hours and then go back to just viewing the last 500 or so.

Cross platform support

Currently this only supports windows using popen with ping.exe, which even has some problems with differences between languages of windows and it most certainly won't work on linux/mac

So the ping part should probably be reimplemented using socks, but I believe this will instead require sudo/admin privileges, at least if a ICMP ping is used, but maybe a tcp ping might be possible to implement without requiring the program to run as sudo.

Clean up some thing

I think a lot more of the logic should be split out into its own functions and many of these function should be moved out of the main .pyw file into a file of its own and unittests should be applied to all these functions.

This does not really go for the wxplot.py file as that just is a mess in which it probably is difficult to split out anything as almost everything is related to the matplotlib objects.

Assert error (GDI gui handle leak?)

The program sometimes throws an assert error, which originates from matplotlib in some way I think. Essentially from some googling I did on this problem at one time, said it was a problem with GUI handles leaking, which I thought I fixed by force removing the line objects from the canvas when stopping.

Luckily this error doesn't stop the execution of the program, it just throws up a msgbox when the error is captured and I've only encountered the bug when running a fullscreen program (a game) and the program has been running for at least a few hours, actively plotting.

In the end I currently think this is somehow related to how I do the .blit in matplotlib to reduce CPU strain. It might be that a different call should be used than .blit(ax.bbox) to update the canvas, but the commands that I've found when googling doesn't seem to exist when I try them. A method I've seen in some guides about using blit called for using canvas.Update() to draw without encountering any leaks with the wx-backend, but that command doesn't seem to exist.

wxYield called recrsively

Uncaught exception:
Traceback (most recent call last):
  File "I:\Dropbox\ping\ping_gui.pyw", line 246, in onPlotting
    self.line_ping, self.line_timeout]
  File "I:\Dropbox\ping\wxplot.py", line 822, in update_plot_only
    self.canvas.flush_events()
  File "C:\Python27\lib\site-packages\matplotlib\backends\backend_wx.py", line 758, in flush_events
    wx.Yield()
  File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 7698, in Yield
    return _core_.Yield(*args)
PyAssertionError: C++ assertion "wxAssertFailure" failed at ..\..\src\msw\app.cpp(707) in wxApp::Yield(): wxYield called recursively

Following error will occur at random intervals, but usually it seems to be a few days in between.

Better plotting when displaying a large amount of data

When displaying a large amount of data in the plot (e.g 3000 points) it can get hard to see what happens and a way to improve this would be to put the data through an averaging window and for example reduce the amount of points to a 1/5 averaged.

This must somehow also handle dropped packages some way in the averaged data. A solution I've seen in cacti is to color code the line depending on the amount of packet loss (colors would have to be predefined and fully locked, not practical to do dynamically), and cacti also used a transparent gray fill color to display the standard deviation.

See this image below to understand the messiness that you can get.
image

Ping aborts on exception

Ping cycle now stops on unhandled exception and the ping must be manually stoped and started for it to function.

This is probably a side effect of thread safety fixes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.