~charles-roduit/openfovea/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#! /usr/bin/env python
#-*- coding: iso-8859-1 -*-


import cProfile
import pstats
import time

from openfovea import openfovea_gui
from openfovea.fovea_toolbox import opengl_gtk
from pyprof2calltree import convert, visualize

if __name__ == '__main__':
    #prof = cProfile.runctx('openfovea_gui.main()', globals(), locals())
    #print "<pre>"
    file_name = "profile_it" + time.strftime('%Y%m%d_%H%M%S') + ".pprofile"
    cProfile.run('opengl_gtk.main()', file_name)
    #cProfile.run('openfovea_gui.main()', file_name)
    
    #stats = pstats.Stats(prof)
    visualize(file_name)
    #convert('out.stats', 'out.kgrind')
    #stats.sort_stats('cumulative')
    #stats.print_stats(80)
    #print "<pre>"