aboutsummaryrefslogtreecommitdiff
path: root/deprecated/mem_tests/total_mem_actual.py
diff options
context:
space:
mode:
Diffstat (limited to 'deprecated/mem_tests/total_mem_actual.py')
-rwxr-xr-xdeprecated/mem_tests/total_mem_actual.py37
1 files changed, 0 insertions, 37 deletions
diff --git a/deprecated/mem_tests/total_mem_actual.py b/deprecated/mem_tests/total_mem_actual.py
deleted file mode 100755
index d2a0cedf..00000000
--- a/deprecated/mem_tests/total_mem_actual.py
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/usr/bin/python2
-"""Parses the actual memory usage from TCMalloc.
-
-This goes through logs that have the actual allocated memory (not sampled) in
-the logs. The output is of the form of:
-
-time (in seconds from some base time), amount of memory allocated by the
-application
-
-"""
-
-import argparse
-from cros_utils import compute_total_diff
-from datetime import datetime
-
-pretty_print = True
-
-parser = argparse.ArgumentParser()
-parser.add_argument('filename')
-args = parser.parse_args()
-
-my_file = open(args.filename)
-output_file = open('raw_memory_data.csv', 'a')
-
-base_time = datetime(2014, 6, 11, 0, 0)
-prev_line = ''
-half_entry = (None, None)
-
-for line in my_file:
- if 'Output Heap Stats:' in line:
- total_diff = compute_total_diff(line, base_time)
- half_entry = (total_diff, None)
- if 'Bytes in use by application' in line:
- total_diff = half_entry[0]
- memory_used = int(line.strip().split()[1])
- half_entry = (None, None)
- output_file.write('{0},{1}\n'.format(total_diff, memory_used))