Debian Codegraph @

planetary_system_stacker/Test_programs/print_profile_info.py

raw symbols SCIP
1 # -*- coding: utf-8 -*-
2 """
3 Created on Tue Jun 25 19:54:17 2019
4 @author: [email protected]
5 Run
6 > python -m cProfiler -o profile_info.txt main_program.py
7 to create profiling information, then run this file to output the top 10 function calls
8 (by cumulative time).
9 Make sure that you have set 'show_results = False' in the 'Specify Test Case'
10 section in main_program.py (else some graphic displays are opened, which
11 wait for the user to close the window)
12 """
13
14
15 import pstats
16 from pstats import SortKey
17 p = pstats.Stats('profile_info.txt')
18 p.sort_stats(SortKey.CUMULATIVE).print_stats(10)
19
20 # p.strip_dirs().sort_stats(-1).print_stats()