def run(self, test_id: str):
        setup_monitor()

        sample_id = monitor.start_duration_sample()
        rs = self._do_run(test_id)
        monitor.stop_duration_sample('client: cumulative time', sample_id)

        monitor.stop()
        print_test_results(rs)
Exemple #2
0
def run_with_monitoring():
    for _ in range(loops):
        sample_id = monitor.start_duration_sample()
        do_work()
        monitor.stop_duration_sample('test', sample_id)
def post_request(worker, req, environ, resp):
    key = f"{req.path} [{req.method}]"
    monitor.stop_duration_sample(key, req.duration_sample_id)