8 lines
217 B
Python
8 lines
217 B
Python
import cProfile
|
|
import pstats
|
|
|
|
# Load the profiling data from the file
|
|
stats = pstats.Stats('profile_results.txt')
|
|
|
|
# Print the top 10 functions by cumulative time
|
|
stats.sort_stats('cumulative').print_stats(25) |