Revision: 1106
http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1106&view=rev
Author: roman_yakovenko
Date: 2007-08-17 22:47:24 -0700 (Fri, 17 Aug 2007)
Log Message:
-----------
adding new test case
Modified Paths:
--------------
pygccxml_dev/unittests/test_performance.py
Modified: pygccxml_dev/unittests/test_performance.py
===================================================================
--- pygccxml_dev/unittests/test_performance.py 2007-08-18 05:38:24 UTC (rev 1105)
+++ pygccxml_dev/unittests/test_performance.py 2007-08-18 05:47:24 UTC (rev 1106)
@@ -83,6 +83,14 @@
reader = parser.project_reader_t( parser.config_t(gccxml_path=autoconfig.gccxml_path) )
reader.read_files([include_std_header])
+def test_on_big_file( file_name, count ):
+ file_name = os.path.join( autoconfig.data_directory, file_name )
+ for i in range( count ):
+ reader = parser.project_reader_t( parser.config_t(gccxml_path=autoconfig.gccxml_path) )
+ decls = reader.read_files([parser.create_gccxml_fc( file_name )])
+ global_ns = declarations.get_global_namespace( decls )
+ global_ns.init_optimizer()
+
def parse_big_file():
reader = parser.project_reader_t( parser.config_t(gccxml_path=autoconfig.gccxml_path) )
reader.read_files([parser.create_gccxml_fc( os.path.join( autoconfig.data_directory, 'big.xml' ) )])
@@ -97,7 +105,7 @@
#~ test_project_on_include_std_dot_hpp()
print 'running'
prof = hotshot.Profile( 'parser.prof' )
- prof.runcall(parse_big_file )
+ prof.runcall( lambda: test_on_big_file( 'big2.xml', 1 ) )
stats = hotshot.stats.load("parser.prof")
stats.sort_stats('time', 'calls')
stats.print_stats(30)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|