@contextmanager
def perf_monitor_disabled(tconf):
    old_unsafe = tconf.unsafe.copy()
    tconf.unsafe.add('disable_view_change')
    (yield tconf)
    tconf.unsafe = old_unsafe
@contextmanager
def perf_monitor_disabled(tconf):
    old_unsafe = tconf.unsafe.copy()
    tconf.unsafe.add('disable_view_change')
    (yield tconf)
    tconf.unsafe = old_unsafe