Started profiling project (Issue #109). Created first profiling script and included test gerber.
This commit is contained in:
@@ -191,7 +191,6 @@ class FlatCAMGUI(QtGui.QMainWindow):
|
|||||||
# self.right_layout.setContentsMargins(0, 0, 0, 0)
|
# self.right_layout.setContentsMargins(0, 0, 0, 0)
|
||||||
right_widget.setLayout(self.right_layout)
|
right_widget.setLayout(self.right_layout)
|
||||||
|
|
||||||
|
|
||||||
################
|
################
|
||||||
### Info bar ###
|
### Info bar ###
|
||||||
################
|
################
|
||||||
|
|||||||
3045
tests/gerber_parsing_profiling/gerber1.gbr
Executable file
3045
tests/gerber_parsing_profiling/gerber1.gbr
Executable file
File diff suppressed because it is too large
Load Diff
15
tests/gerber_parsing_profiling/gerber_parsing_profile_1.py
Normal file
15
tests/gerber_parsing_profiling/gerber_parsing_profile_1.py
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import cProfile
|
||||||
|
import pstats
|
||||||
|
import sys
|
||||||
|
sys.path.append('../../')
|
||||||
|
|
||||||
|
from camlib import *
|
||||||
|
|
||||||
|
log = logging.getLogger('base2')
|
||||||
|
log.setLevel(logging.WARNING)
|
||||||
|
|
||||||
|
g = Gerber()
|
||||||
|
|
||||||
|
cProfile.run('g.parse_file("gerber1.gbr")', 'gerber1_profile', sort='cumtime')
|
||||||
|
p = pstats.Stats('gerber1_profile')
|
||||||
|
p.strip_dirs().sort_stats('cumulative').print_stats(.1)
|
||||||
Reference in New Issue
Block a user