Skip to main content
Filter by
Sorted by
Tagged with
2 votes
0 answers
67 views

I'm trying to understand how memory is used in my async Python application. I have multiple coroutines running, and I want to see how much memory each one is using, especially when they are nested or ...
Optidev's user avatar
  • 218
1 vote
0 answers
263 views

I trying to debug a memory leak in my python ML app. When I run it locally, the memory usage on my local machine increases gradually by 700mb. So I put a breakpoint in when memory use is around its ...
tobmo's user avatar
  • 45
1 vote
1 answer
1k views

Python code: def my_function(): my_list = [i for i in range(1_000_000)] return my_list my_list = my_function() Memory usage reported by different libraries: memory_profiler: 82MB tracemalloc:...
Shrinidhi M's user avatar
2 votes
1 answer
591 views

So I have an issue with the import of a driver, which apparently leads to almost all threads that I open to end in a Resourcewarning. (python version 3.9.16 on Windows in Anaconda environment; nidaqmx ...
Toni Berger's user avatar
1 vote
0 answers
430 views

I am attempting to write a generic,python script that memory profiles a target script, but I can't figure out how to get line-by-line memory stats from the script being run by subprocess. # ...
leftoverBits's user avatar
0 votes
0 answers
431 views

I have this code: def print_statistics(s: Snapshot, s2: Snapshot): stats = s2.compare_to(s, 'lineno') for stat in stats[:20]: print(stat) def some_func() tracemalloc.start(50) ...
Ema Il's user avatar
  • 437
1 vote
1 answer
1k views

I am currently working on a project where a python program is supposed to be running for several days, essentially in an endless loop until an user intervenes. I have observed that the ram usage (as ...
Wololo's user avatar
  • 31
0 votes
0 answers
379 views

I am running apache benchmark (ab) with server [httpd2.4.52] running locally. I want to track how many memory allocations and what size allocations does the server make. I run 'valgrind --trace-malloc=...
Aditi Partap's user avatar
1 vote
0 answers
463 views

I'm running the following simple script to get some familiarity with tracemalloc: import tracemalloc import linecache def display_custom(snapshot): ... # skipped for shorter code tracemalloc....
mpr's user avatar
  • 43
1 vote
0 answers
1k views

I'm encountering a subtle memory leak, and unable to determine the source using tracemalloc. I run the following code in google colab, which is meant to optimize hyperparameters for a custom ppo agent....
watch-this's user avatar
2 votes
1 answer
2k views

I am using the tracemalloc library to pinpoint memory concerns in my application. This is the code that I am using. tracemalloc.start() snapshot = tracemalloc.take_snapshot() ...
GeekGeek4's user avatar
  • 149
1 vote
1 answer
983 views

Using Python's 3.5 tracemalloc module as follows tracemalloc.start(25) # (I also tried PYTHONTRACEMALLOC=25) snapshot_start = tracemalloc.take_snapshot() ... # my code is running snapshot_stop = ...
Michael Sanders's user avatar
1 vote
1 answer
4k views

I have a function like this: def init_cars(self, directory=''): #some_code cars = set([line.rstrip('\n') for line in open(directory + "../myfolder/all_cars.txt")]) #some_more_code I am ...
Saffik's user avatar
  • 1,013
-1 votes
1 answer
453 views

I have to serialize to JSON string the result of tracemalloc. current_mem, peak_mem = tracemalloc.get_traced_memory() overhead = tracemalloc.get_tracemalloc_memory() stats = tracemalloc.take_snapshot(...
loretoparisi's user avatar
  • 16.3k