s4hri / pykron

Other
0 stars 2 forks source link

Visualizing exported information #21

Open ddetommaso opened 3 years ago

ddetommaso commented 3 years ago

We want to investigate methods for visualizing offline exported data.

ddetommaso commented 3 years ago

DEBUG information are contained in an output file (#20).

We need to implement a PykronVisualizer class that takes as input the output file and produce a useful visualization at screen.

Proposal:

  1. Using of web interface for visualization. The PykronVisualizer will create a web server which allow the developer to access the web application on a browser.

  2. Dashboard visualization. The home page of the webapp might be a dashboard for visualizing information about the Pykron library installed, the current system specs and basic options for selecting the debug file.

  3. Visualization graph. Once the exported file is imported the user has to select which AsyncRequest will be take into account for the visualization. Those AsyncRequests are the executions present in the exported file. For each AsyncRequest a XY row graph is generated. X-axis will contains non-negative integer values depending on the execution time of the request. Y-axis will contain timestamp values. A interpolated line between XY datapoints represents the execution of the Task related to the request. Y values equal to 0 means that the Task is not running. Y values > 0 means that the Task is running. By default the Y value of a running Task is equal to 1. Whenever an AsyncRequest contains a call to another AsyncRequest (nested requests) a new parallel Task will be executed. In this case a new XY line will be created, where the positive value is equal to +1 respect to the parent.

adamlukomski commented 3 years ago
  1. On of the possibilities is to return to Matplotlib for handling the analysis part, with mpld3 library as javascript output - https://mpld3.github.io/examples/index.html examples seems very promising, I initially abandoned mpl in favour of qt5 for gui, but I didn't think of the browser then
  2. miniature SimpleHTTPServer from internatl python libs or something bigger like Flask?
  3. I'm making a sketch...
ddetommaso commented 3 years ago

If I think about a long-term solution Flask is the most flexible solution. mpld3 library anyway is a good solution for fast proto for visualizing debugging data.

adamlukomski commented 3 years ago

Flask extension for easier REST: https://flask-restful.readthedocs.io/en/latest/