chandanpasunoori / currentcostgui

Automatically exported from code.google.com/p/currentcostgui
GNU General Public License v3.0
0 stars 0 forks source link

performance during live graphing #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

What is the expected output? What do you see instead?
6 wxPython windows produced

What version of the product are you using? On what operating system?

just loaded .17 on XPSP3

Please provide any additional information below.

Original issue reported on code.google.com by stuboy...@googlemail.com on 4 Feb 2009 at 5:48

GoogleCodeExporter commented 9 years ago
Hi Dale have done a grab of the messages for you, you get 6 boxes plus the main 
message
Cheers
Stu

Original comment by stuboy...@googlemail.com on 7 Feb 2009 at 11:42

Attachments:

GoogleCodeExporter commented 9 years ago
Just had this message, after getting the message attached.

Traceback (most recent call last):
  File "currentcost.py", line 666, in onConnect
  File "currentcost.py", line 1404, in getDataFromCurrentCostMeter
AttributeError: 'dict' object has no attribute 'startswith'

hope it helps :-)
Stu

Original comment by stuboy...@googlemail.com on 21 Feb 2009 at 6:01

Attachments:

GoogleCodeExporter commented 9 years ago
Thought I'd add this graph, it shows current cost usiong 100% of one of my CPU 
cores
every 6secs? on reading live data. Might be connected with crashes perhaps?
Regards

Original comment by stuboy...@googlemail.com on 6 Mar 2009 at 3:54

Attachments:

GoogleCodeExporter commented 9 years ago
here's a graph when the app first starts live graphing as you can see peak load 
on
cpu is only 10%

Original comment by stuboy...@googlemail.com on 6 Mar 2009 at 5:22

Attachments:

GoogleCodeExporter commented 9 years ago
When an update is received from a CurrentCost meter, the live graph is redrawn

See
<http://code.google.com/p/currentcostgui/source/browse/trunk/currentcostlivedata
.py?r=140#288>

The graphs are redrawn (see
<http://code.google.com/p/currentcostgui/source/browse/trunk/currentcostlivedata
.py?r=140#102>)
using plot_date (see
<http://matplotlib.sourceforge.net/api/axes_api.html?highlight=plot_date#matplot
lib.axes.Axes.plot_date>),
giving it the complete set of live data for plotting.

I'm not sure how this works, internally - but if you're seeing significantly
increasing CPU usage over time, I'm thinking it might not be adding a new single
point, but perhaps redrawing the whole graph from scratch. In which case, the 
larger
the data set gets each time, the bigger the task involved in redrawing the live 
graph. 

I'll have a look and see if there is a more efficient approach for realtime 
graphing
in matplotlib, other than plot_date followed by draw.

(Any suggestions for how to do this would be very welcome - either posted here 
as a
comment, or submitted as a code change!)

Original comment by dale.l...@gmail.com on 6 Mar 2009 at 5:43