473,289 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,289 software developers and data experts.

Thread Profiling

Are there any good thread profilers available that can profile a
thread as it is running instead of after execution is completed?

I would like to find a python class which looks at a currently running
thread and if its memory exceeds a certain amount than kill it.
Ideally I would like the program to track memory used not just by that
thread, but by any threads or processes that it may spawn.

If there isn't anything like that, then something that lets me set the
maximum memory allowed to be allocated within a thread would be
acceptable also.

Thanks in advance,
James Howard

Nov 5 '07 #1
1 1404
On Nov 5, 2007 1:32 PM, JamesHoward <Ja************@gmail.comwrote:
Are there any good thread profilers available that can profile a
thread as it is running instead of after execution is completed?

I would like to find a python class which looks at a currently running
thread and if its memory exceeds a certain amount than kill it.
Killing a non-cooperative thread is undefined behavior. You can't do
it with the Python threading API and even OS thread implementations
that permit it don't guarantee that your process will be in a sane
state afterward.
Ideally I would like the program to track memory used not just by that
thread, but by any threads or processes that it may spawn.

If there isn't anything like that, then something that lets me set the
maximum memory allowed to be allocated within a thread would be
acceptable also.
Memory isn't allocated on a per-thread basis and there's not really
any way to know what should be charged to a particular thread. That's
on top of the normal caveats about trying to judge memory usage within
Python

Thanks in advance,
James Howard

--
http://mail.python.org/mailman/listinfo/python-list
Nov 5 '07 #2

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

Similar topics

0
by: Irmen de Jong | last post by:
Okay I tried some profiling, but am uncertain about the results I'm getting. They confuse the hell out of me. I have a test program (see below) that essentially has two loops that get called...
5
by: Kieran Benton | last post by:
Hello, I'm currently in the tail end process of developing a high scalability server for my employer. Essentially it receives short socket based connections with an ASCII message, parses that...
4
by: skip | last post by:
I would like to try a sampling approach to profiling. My thought is to have a profiling thread that samples the execution frame of all the other started threads. I don't see any path from the...
4
by: Adam Benson | last post by:
Hi, We have an app which, every now and then, has very high CPU usage. Profiling under perfmon shows it to be thread #3 which is running at >=95%. I took a process dump and looked at thread #3...
0
by: L'eau Prosper Research | last post by:
Press Release: L'eau Prosper Research (Website: http://www.leauprosper.com) releases new TradeStation 8 Add-on - L'eau Prosper Market Manipulation Profiling Tools Set. L'eau Prosper Market...
0
by: L'eau Prosper Research | last post by:
NEW TradeStation 8 Add-on - L'eau Prosper Market Manipulation Profiling Tools Set By L'eau Prosper Research Press Release: L'eau Prosper Research (Website: http://www.leauprosper.com) releases...
4
by: Frankie | last post by:
This is from MSDN online (http://msdn2.microsoft.com/en-us/library/d00bd51t.aspx): "Specify zero (0) to indicate that this thread should be suspended to allow other waiting threads to execute." ...
11
by: Jon Slaughter | last post by:
Is there any way to start a terminated thread without using a pool or creating a new thread object? void counter() { clicks = 0; clock.Start(); while (counterActive) { clicks++;
9
by: Peter Duniho | last post by:
I'm especially hoping Ben Voigt and/or Bob Powell see this (I saw their names on the m.p.d.f.performance newsgroup :) ) I would have posted to the performance newsgroup, but I see very little on...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.