Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > High CPU utilization with Pylab

Reply
Thread Tools

High CPU utilization with Pylab

 
 
Madhur
Guest
Posts: n/a
 
      09-05-2010
I am trying to plot a runtime graph using pylab. But the very purpose
of functionality is lost because of high CPU percentage hogged by
plotting the graph.

Here is the piece of code which I have written.

def timerfunc(ulcm, dlcm):
count=0
xaxis=[]
yaxis=[]
ion()
while 1:
xaxis.append(count)
dr=(((dlcm.sum)/dlcm.timer)*
dlcm.counter=0
yaxis.append(dr)
dlcm.sum=0
h=plot(xaxis,yaxis,'b')
draw()
count=count+1
time.sleep(dlcm.timer/1000.0)
if (count>100):
xlim(count-100, count)

Here is the function which plots the graph.

Is there something which does not makes sense .?

-Madhur
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
High CPU utilization on Cisco 1760 Bancal Cisco 3 09-19-2005 06:03 PM
2650 IP Input High CPU Utilization Problem Brian R. Jack Cisco 1 09-15-2004 09:41 AM
2650 IP Input High CPU Utilization Problem Brian R. Jack Cisco 8 09-14-2004 04:44 AM
high CPU utilization Miguel Moreno Cisco 4 01-30-2004 12:39 AM
2600XM, Frame Relay, and High CPU Utilization Donald Zelenak Jr. Cisco 5 12-06-2003 01:18 AM



Advertisments