flatcam/tests/gerber_parsing_profiling/gerber_parsing_profile_1.py
Marius Stanciu a6b89dbf3a - moved back the ApertureMacro class to camlib for now and made some import changes in the new ParseGerber and ParseExcellon classes
- some changes to the tests - perhaps I will try adding a few tests in the future
2019-10-06 15:56:41 +03:00

17 lines
521 B
Python

import cProfile
import pstats
import sys
sys.path.append('../../')
from flatcamParsers.ParseGerber import *
log = logging.getLogger('base2')
log.setLevel(logging.WARNING)
g = Gerber()
#cProfile.run('g.parse_file("gerber1.gbr")', 'gerber1_profile', sort='cumtime')
cProfile.run('g.parse_file("/home/jpcaram/flatcam_test_files/Gerbers/AVR_Transistor_Tester_silkscreen_top.GTO")',
'gerber1_profile', sort='cumtime')
p = pstats.Stats('gerber1_profile')
p.strip_dirs().sort_stats('cumulative').print_stats(.1)