summaryrefslogtreecommitdiff
path: root/python/pkg/cdec/sa/compile.py
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
commitcfef250df7ef378d6678bb6fc26402407f496184 (patch)
tree19e2596e4b4cdafb61cfc66ada6433cd5a48452a /python/pkg/cdec/sa/compile.py
parent4f9ab0daefcd4b1ff9ae810908cdf5be143f68c5 (diff)
Memory analysis pointless code.
Diffstat (limited to 'python/pkg/cdec/sa/compile.py')
-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)