From bb79fdc140a5593124d3943769a644c6cc3d87f6 Mon Sep 17 00:00:00 2001 From: Paul Baltescu Date: Fri, 22 Feb 2013 16:50:29 +0000 Subject: Memory analysis pointless code. --- python/pkg/cdec/sa/compile.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'python/pkg/cdec') diff --git a/python/pkg/cdec/sa/compile.py b/python/pkg/cdec/sa/compile.py index d4cd8387..1362e7b5 100644 --- a/python/pkg/cdec/sa/compile.py +++ b/python/pkg/cdec/sa/compile.py @@ -21,6 +21,10 @@ def precompute(f_sa, max_len, max_nt, max_size, min_gap, rank1, rank2, tight_phr train_min_gap_size=min_gap) return precomp +def my_pause(): + for i in range(10000000): + print >> sys.stderr, "" + def main(): preprocess_start_time = monitor_cpu() sys.setrecursionlimit(sys.getrecursionlimit() * 100) @@ -85,6 +89,8 @@ def main(): stop_time = monitor_cpu() logger.info('Compiling source suffix array took %f seconds', stop_time - start_time) + my_pause() + start_time = monitor_cpu() logger.info('Compiling target data array') if args.bitext: @@ -94,6 +100,7 @@ def main(): e.write_binary(e_bin) stop_time = monitor_cpu() logger.info('Compiling target data array took %f seconds', stop_time - start_time) + my_pause() start_time = monitor_cpu() logger.info('Precomputing frequent phrases') @@ -101,12 +108,15 @@ def main(): stop_time = monitor_cpu() logger.info('Compiling precomputations took %f seconds', stop_time - start_time) + my_pause() + start_time = monitor_cpu() logger.info('Compiling alignment') a = cdec.sa.Alignment(from_text=args.alignment) a.write_binary(a_bin) stop_time = monitor_cpu() logger.info('Compiling alignment took %f seonds', stop_time - start_time) + my_pause() start_time = monitor_cpu() logger.info('Compiling bilexical dictionary') @@ -114,6 +124,7 @@ def main(): lex.write_binary(lex_bin) stop_time = monitor_cpu() logger.info('Compiling bilexical dictionary took %f seconds', stop_time - start_time) + my_pause() # Write configuration config = cdec.configobj.ConfigObj(args.config, unrepr=True) -- cgit v1.2.3