bencher.sweep_timings ===================== .. py:module:: bencher.sweep_timings .. autoapi-nested-parse:: Lightweight timing instrumentation for bencher sweep phases. Classes ------- .. autoapisummary:: bencher.sweep_timings.SweepTimings Functions --------- .. autoapisummary:: bencher.sweep_timings.phase_timer Module Contents --------------- .. py:class:: SweepTimings Timing data for a single run_sweep() call. Each field records the wall-clock duration in milliseconds of a major phase inside ``Bench.run_sweep()`` or ``Bench.calculate_benchmark_results()``. .. py:attribute:: cache_check_ms :type: float :value: 0.0 .. py:attribute:: sample_cache_init_ms :type: float :value: 0.0 .. py:attribute:: dataset_setup_ms :type: float :value: 0.0 .. py:attribute:: job_submission_ms :type: float :value: 0.0 .. py:attribute:: job_execution_ms :type: float :value: 0.0 .. py:attribute:: history_merge_ms :type: float :value: 0.0 .. py:attribute:: post_setup_ms :type: float :value: 0.0 .. py:attribute:: render_ms :type: float :value: 0.0 .. py:attribute:: report_save_ms :type: float :value: 0.0 .. py:attribute:: total_ms :type: float :value: 0.0 .. py:method:: compute_total() -> float Compute total_ms as the sum of all phase timing fields. .. py:method:: summary() -> dict[str, float] Return all phase timings as a dict. .. py:function:: phase_timer() Context manager that yields a callable returning elapsed milliseconds. Usage:: with phase_timer() as elapsed: do_work() timings.some_phase_ms = elapsed()