graph LR
CLI_IPython_Orchestrator["CLI & IPython Orchestrator"]
Profile_Data_Acquisition_Layer["Profile Data Acquisition Layer"]
Runtime_Profile_Processor["Runtime Profile Processor"]
Import_Profile_Processor["Import Profile Processor"]
Visualization_Generation_Engine_Backend_["Visualization Generation Engine (Backend)"]
Local_Web_Server["Local Web Server"]
Frontend_Visualization_Client_side_["Frontend Visualization (Client-side)"]
CLI_IPython_Orchestrator -- "initiates" --> Profile_Data_Acquisition_Layer
CLI_IPython_Orchestrator -- "triggers" --> Local_Web_Server
Profile_Data_Acquisition_Layer -- "delegates to" --> Runtime_Profile_Processor
Profile_Data_Acquisition_Layer -- "delegates to" --> Import_Profile_Processor
Runtime_Profile_Processor -- "provides processed data to" --> Visualization_Generation_Engine_Backend_
Import_Profile_Processor -- "provides processed data to" --> Visualization_Generation_Engine_Backend_
Visualization_Generation_Engine_Backend_ -- "provides rendered output to" --> Local_Web_Server
Local_Web_Server -- "serves web assets to" --> Frontend_Visualization_Client_side_
Frontend_Visualization_Client_side_ -- "requests data from" --> Local_Web_Server
Frontend_Visualization_Client_side_ -- "renders data received from" --> Local_Web_Server
click CLI_IPython_Orchestrator href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/tuna/CLI_IPython_Orchestrator.md" "Details"
click Profile_Data_Acquisition_Layer href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/tuna/Profile_Data_Acquisition_Layer.md" "Details"
click Runtime_Profile_Processor href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/tuna/Runtime_Profile_Processor.md" "Details"
click Frontend_Visualization_Client_side_ href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/tuna/Frontend_Visualization_Client_side_.md" "Details"
The tuna architecture is designed around a clear data flow pipeline, starting with user interaction through a CLI & IPython Orchestrator. This orchestrator initiates the profiling process, directing raw performance data through a Profile Data Acquisition Layer to specialized Runtime or Import Profile Processors. The processed data then feeds into a Visualization Generation Engine (Backend) which prepares the interactive web content. A Local Web Server serves this content to the user's browser, where the Frontend Visualization (Client-side) renders the interactive performance graphs, completing the data visualization loop. This modular design ensures clear separation of concerns for data acquisition, processing, backend rendering, and client-side presentation, making it ideal for flow graph representation.
CLI & IPython Orchestrator [Expand]
The primary user interface, handling command-line arguments and IPython magic commands. It orchestrates the entire profiling, data processing, and visualization workflow.
Related Classes/Methods:
Profile Data Acquisition Layer [Expand]
An abstraction responsible for reading and initially parsing various types of raw performance profile data (e.g., cProfile, import times). It dispatches to specific profile processors.
Related Classes/Methods:
Runtime Profile Processor [Expand]
Specializes in parsing, structuring, and enriching runtime performance data (e.g., from cProfile dumps) into a standardized format suitable for visualization.
Related Classes/Methods:
Focuses on processing and structuring import time performance data, including hierarchical organization and adding visualization-specific attributes.
Related Classes/Methods:
Transforms processed performance data into the final interactive web-based visualization, involving templating HTML and embedding data for the frontend.
Related Classes/Methods:
A lightweight HTTP server responsible for hosting and serving the interactive visualization frontend (HTML, CSS, JavaScript) and processed data to the client.
Related Classes/Methods:
Frontend Visualization (Client-side) [Expand]
The interactive web application, primarily built with D3.js, Bootstrap, HTML, CSS, and JavaScript, responsible for rendering the performance data as an icicle graph and providing user interaction.
Related Classes/Methods: