473,569 Members | 2,991 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

pstats: negative time values

Hi,

A quick question - can anyone tell me how to interpret
negative time values in pstats.Stats.pr int_stats() output?
Eg -

39052965 function calls (38035317 primitive calls) in -250.959 CPU
seconds

Ordered by: internal time
List reduced from 202 to 20 due to restriction <20>

ncalls tottime percall cumtime percall
filename:lineno (function)
5829 26.423 0.005 -155.269 -0.027 :0(parse)
...
This is with Python 2.4 on Linux. Is it a bug, or what
does it mean?

Thanks!

Tom
Jul 19 '05 #1
1 1948
A few days ago Tom Mortimer wrote:
A quick question - can anyone tell me how to interpret negative time
values in pstats.Stats.pr int_stats() output?


See http://docs.python.org/lib/profile-limits.html

After the profiler is calibrated, it will be more accurate (in a least
square sense), but it will sometimes produce negative numbers (when call
counts are exceptionally low, and the gods of probability work against
you :-). ) Do not be alarmed by negative numbers in the profile. They
should only appear if you have calibrated your profiler, and the results
are actually better than without calibration.

See also http://docs.python.org/lib/profile-calibration.html
for information on how to change the calibration number.

Andrew
da***@dalkescie ntific.com

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
10237
by: Colin Brown | last post by:
Python 2.3.3 Under Windows NT: Negative Int or Real -> sleeps for a long time Under Linux: Returns IOError: Invalid argument I consider both of these unfriendly results and expected the preferable silent time.sleep(0) in much the same way that slicing a string beyond the ends returns an empty string. Colin Brown PyNZ
7
8211
by: pj | last post by:
Why does M$ Query Analyzer display all numbers as positive, no matter whether they are truly positive or negative ? I am having to cast each column to varchar to find out if there are any negative numbers being hidden from me :( I tried checking Tools/Options/Connections/Use Regional Settings both on and off, stopping and restarting M$...
2
3703
by: luke | last post by:
Could anyone, please, explain to me why I have negative values in RowModCtr column in sysobjects table? I have tested that after I update statistics the RowModCtr column is reset to 0. But why do I have negative values in the first place? Thx.
13
6518
by: Ron | last post by:
Hi all I'm deciding whether to use the PK also as an account number, invoice number, transaction number, etc that the user will see for the respective files. I understand that sometimes a number will be missing, which is not a problem for my purposes I don't think, but how would it be negative? Can randomly created PK autonumber fields be...
5
6108
by: Subrahmanyam Arya | last post by:
Hi Folks , I am trying to solve the problem of reading the numbers correctly from a serial line into an intel pentium processor machine . I am reading 1 byte and 2byte data both positive and negative quantities . Can any one tell me what are the things i should bear in mind .
2
11257
by: Angus Comber | last post by:
Hello Sorry this really is a newbie question! I am doing some floating point arithmetic and calculating the time difference between two dates. The date values being comparied are actually double values. I was going to compare the dates by calculating the difference betwen the two numbers. But sometimes you get a -ve and sometimes a...
1
4796
by: illegal.prime | last post by:
So I see from the documentation here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemCollectionsArrayListClassBinarySearchTopic.asp That the code uses the less than operator: int myIndex=myList.BinarySearch( myObject ); if ( myIndex < 0 ) when using the BinarySearch method and in my own experience I...
39
3978
by: Frederick Gotham | last post by:
I have a general idea about how negative number systems work, but I'd appreciate some clarification if anyone would be willing to help me. Let's assume we're working with an 8-Bit signed integer, and that it contains no padding. Firstly, I realise that the MSB is known as the sign-bit, and that it indicates whether the number is positive...
2
10303
by: Juha S. | last post by:
Hi, I'm trying to use the Python profilers to test my code, but I get the following output for cProfile.run() at the interpreter: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.5/cProfile.py", line 36, in run result = prof.print_stats(sort) File "/usr/lib/python2.5/cProfile.py", line 80, in...
0
7926
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7679
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6287
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5223
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3657
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3647
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2117
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1228
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
946
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.