From aa3e4fb8e176fb6992dda95b8c5b4d660b17c67f Mon Sep 17 00:00:00 2001 From: nyanpasu64 Date: Sat, 25 Aug 2018 15:46:39 -0700 Subject: [PATCH] Rename RENDER_PROFILING to PRINT_TIMESTAMP --- ovgenpy/ovgenpy.py | 8 ++++---- tests/test_channel.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ovgenpy/ovgenpy.py b/ovgenpy/ovgenpy.py index 6748f5d..bbf36da 100644 --- a/ovgenpy/ovgenpy.py +++ b/ovgenpy/ovgenpy.py @@ -15,7 +15,7 @@ from ovgenpy.wave import Wave # cgitb.enable(format='text') -RENDER_PROFILING = True +PRINT_TIMESTAMP = True @register_enum @unique @@ -140,7 +140,7 @@ class Ovgen: renderer = self._load_renderer() - if RENDER_PROFILING: + if PRINT_TIMESTAMP: begin = time.perf_counter() benchmark_mode = self.cfg.benchmark_mode @@ -153,7 +153,7 @@ class Ovgen: time_seconds = frame / fps rounded = int(time_seconds) - if RENDER_PROFILING and rounded != prev: + if PRINT_TIMESTAMP and rounded != prev: print(rounded) prev = rounded @@ -180,7 +180,7 @@ class Ovgen: for output in self.outputs: output.write_frame(frame) - if RENDER_PROFILING: + if PRINT_TIMESTAMP: # noinspection PyUnboundLocalVariable dtime = time.perf_counter() - begin render_fps = (end_frame - begin_frame) / dtime diff --git a/tests/test_channel.py b/tests/test_channel.py index 12987f9..d5d994b 100644 --- a/tests/test_channel.py +++ b/tests/test_channel.py @@ -24,7 +24,7 @@ def test_channel_subsampling( ): """ Ensure nsamp and trigger/render subsampling are computed correctly. """ - ovgenpy.ovgenpy.RENDER_PROFILING = False # Cleanup Hypothesis testing logs + ovgenpy.ovgenpy.PRINT_TIMESTAMP = False # Cleanup Hypothesis testing logs Wave = mocker.patch.object(ovgenpy.channel, 'Wave') wave = Wave.return_value