summaryrefslogtreecommitdiff
path: root/python/pkg/cdec
diff options
context:
space:
mode:
authorPaul Baltescu <pauldb89@gmail.com>2013-02-22 16:50:29 +0000
committerPaul Baltescu <pauldb89@gmail.com>2013-02-22 16:50:29 +0000
commitbb79fdc140a5593124d3943769a644c6cc3d87f6 (patch)
treed98608bc7b8dd23069b7683ec50ddf7d337abc42 /python/pkg/cdec
parent5f08d976c857c1353ac623f0adbbe5597800d644 (diff)
Memory analysis pointless code.
Diffstat (limited to 'python/pkg/cdec')
-rw-r--r--python/pkg/cdec/sa/compile.py11
1 files changed, 11 insertions, 0 deletions
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)