diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2019-03-19 04:06:20 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2019-03-19 04:06:20 +0100 |
| commit | 41804f81aaa1b3ecfee40059f1bb703c8da2c419 (patch) | |
| tree | 9ac01e3939808325314e8c53d44d5e227b69d64b /src/util.py | |
| parent | 65452ff03e4029c629075776306b8c10c378da98 (diff) | |
| download | allocbench-41804f81aaa1b3ecfee40059f1bb703c8da2c419.tar.gz allocbench-41804f81aaa1b3ecfee40059f1bb703c8da2c419.zip | |
add plain text summary to dj_trace
Format like in:
https://sourceware.org/ml/libc-alpha/2017-01/msg00452.html
Diffstat (limited to 'src/util.py')
| -rw-r--r-- | src/util.py | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/util.py b/src/util.py index fbfdbc7..7265a6b 100644 --- a/src/util.py +++ b/src/util.py @@ -2,7 +2,7 @@ import sys import src.globalvars -def allocbench_msg(color, *objects, sep=' ', end='\n', file=sys.stdout, flush=False): +def allocbench_msg(color, *objects, sep=' ', end='\n', file=sys.stdout): if src.globalvars.verbosity < 0: return @@ -10,37 +10,37 @@ def allocbench_msg(color, *objects, sep=' ', end='\n', file=sys.stdout, flush=Fa "GREEN": "\x1b[32m", "RED": "\x1b[31m"}[color] - print(color, end="", file=file) + print(color, end="", file=file, flush=True) print(*objects, sep=sep, end=end, file=file) - print("\x1b[0m", end="", file=file, flush=flush) + print("\x1b[0m", end="", file=file, flush=True) -def print_debug(*objects, sep=' ', end='\n', file=sys.stdout, flush=False): +def print_debug(*objects, sep=' ', end='\n', file=sys.stdout): if src.globalvars.verbosity < 99: return - print(*objects, sep=sep, end=end, file=file, flush=flush) + print(*objects, sep=sep, end=end, file=file) -def print_info(*objects, sep=' ', end='\n', file=sys.stdout, flush=False): +def print_info(*objects, sep=' ', end='\n', file=sys.stdout): if src.globalvars.verbosity < 1: return - print(*objects, sep=sep, end=end, file=file, flush=flush) + print(*objects, sep=sep, end=end, file=file) -def print_info0(*objects, sep=' ', end='\n', file=sys.stdout, flush=False): +def print_info0(*objects, sep=' ', end='\n', file=sys.stdout): if src.globalvars.verbosity < 0: return - print(*objects, sep=sep, end=end, file=file, flush=flush) + print(*objects, sep=sep, end=end, file=file) -def print_info2(*objects, sep=' ', end='\n', file=sys.stdout, flush=False): +def print_info2(*objects, sep=' ', end='\n', file=sys.stdout): if src.globalvars.verbosity < 2: return - print(*objects, sep=sep, end=end, file=file, flush=flush) + print(*objects, sep=sep, end=end, file=file) -def print_status(*objects, sep=' ', end='\n', file=sys.stdout, flush=False): - allocbench_msg("GREEN", *objects, sep=sep, end=end, file=file, flush=flush) +def print_status(*objects, sep=' ', end='\n', file=sys.stdout): + allocbench_msg("GREEN", *objects, sep=sep, end=end, file=file) -def print_warn(*objects, sep=' ', end='\n', file=sys.stdout, flush=False): +def print_warn(*objects, sep=' ', end='\n', file=sys.stdout): if src.globalvars.verbosity < 1: return - allocbench_msg("YELLOW", *objects, sep=sep, end=end, file=file, flush=flush) + allocbench_msg("YELLOW", *objects, sep=sep, end=end, file=file) -def print_error(*objects, sep=' ', end='\n', file=sys.stderr, flush=False): - allocbench_msg("RED", *objects, sep=sep, end=end, file=file, flush=flush) +def print_error(*objects, sep=' ', end='\n', file=sys.stderr): + allocbench_msg("RED", *objects, sep=sep, end=end, file=file) |
