Skip to content

Latest commit

 

History

History
57 lines (31 loc) · 3.93 KB

File metadata and controls

57 lines (31 loc) · 3.93 KB
graph LR
    src_perfplot__main_bench["src.perfplot._main.bench"]
    src_perfplot__main_Bench["src.perfplot._main.Bench"]
    src_perfplot__main_PerfplotData["src.perfplot._main.PerfplotData"]
    src_perfplot__main_live["src.perfplot._main.live"]
    src_perfplot__main_bench -- "delegates execution to" --> src_perfplot__main_Bench
    src_perfplot__main_bench -- "produces data for" --> src_perfplot__main_PerfplotData
    src_perfplot__main_Bench -- "utilized by" --> src_perfplot__main_bench
    src_perfplot__main_live -- "directly utilizes" --> src_perfplot__main_Bench
Loading

CodeBoardingDemoContact

Details

The perfplot benchmarking subsystem is centered around the bench function, which serves as the primary entry point for initiating performance measurements. This function orchestrates the benchmarking process by delegating the actual timing and execution of user-defined kernels to the Bench class. The Bench class encapsulates the core logic for running benchmarks across various input sizes and managing setup/teardown. Upon completion, the bench function produces raw benchmark data, which is then consumed by PerfplotData for storage and subsequent analysis or visualization. Additionally, the live function provides an interactive interface, directly leveraging the Bench class to perform real-time benchmarking and display results. This architecture ensures a clear separation of concerns, with bench managing the overall flow, Bench handling execution details, PerfplotData managing results, and live providing an interactive user experience.

src.perfplot._main.bench

Acts as the primary facade for initiating benchmarking. It orchestrates the overall benchmarking process, handling initial configuration and delegating the actual timing execution to the Bench class. It also manages the collection of results, which are then made available for data processing.

Related Classes/Methods:

src.perfplot._main.Bench

Encapsulates the precise execution and timing logic. This class is responsible for running user-provided kernels across different input sizes, managing the setup and teardown phases for each individual benchmark. It represents the fundamental "how code is timed" mechanism.

Related Classes/Methods:

src.perfplot._main.PerfplotData

Manages the flow of raw and processed benchmark results. It serves as the data container for the output generated by the benchmarking process, making it crucial for subsequent analysis and visualization.

Related Classes/Methods:

src.perfplot._main.live

Provides an interface for real-time or interactive benchmarking. It directly utilizes the src.perfplot._main.Bench class to perform live timing and display results, indicating a direct dependency on the core execution logic.

Related Classes/Methods: