kopia lustrzana https://github.com/corrscope/corrscope
Rename RENDER_PROFILING to PRINT_TIMESTAMP
rodzic
dbebff7439
commit
aa3e4fb8e1
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Ładowanie…
Reference in New Issue