|
1 | | -**After repository creation:** |
2 | | -- [ ] Update this `README.md`. Update the Project Name, description, and all sections. Remove this checklist. |
3 | | -- [ ] If required, update `LICENSE.txt` and the License section with your project's approved license |
4 | | -- [ ] Search this repo for "REPLACE-ME" and update all instances accordingly |
5 | | -- [ ] Update `CONTRIBUTING.md` as needed |
6 | | -- [ ] Review the workflows in `.github/workflows`, updating as needed. See https://docs.github.com/en/actions for information on what these files do and how they work. |
7 | | -- [ ] Review and update the suggested Issue and PR templates as needed in `.github/ISSUE_TEMPLATE` and `.github/PULL_REQUEST_TEMPLATE` |
| 1 | +# Snapdragon Profiler Ecosystem |
8 | 2 |
|
9 | | -# Project Name |
10 | | - |
11 | | -*\<update with your project name and a short description\>* |
12 | | - |
13 | | -Project that does ... implemented in ... runs on Qualcomm® *\<processor\>* |
| 3 | +A collection of tools for working with [Snapdragon Profiler (SDP)](https://developer.qualcomm.com/software/snapdragon-profiler). |
14 | 4 |
|
15 | 5 | ## Branches |
16 | 6 |
|
17 | 7 | **main**: Primary development branch. Contributors should develop submissions based on this branch, and submit pull requests to this branch. |
18 | 8 |
|
19 | | -## Requirements |
| 9 | +## Available Tools |
| 10 | + |
| 11 | +### Converter |
| 12 | + |
| 13 | +Convert SDP exported CSV trace files into [Perfetto](https://ui.perfetto.dev/) compatible JSON format for visualization and analysis. |
| 14 | +This converter supports CSV files exported from both SDP capture modes: |
20 | 15 |
|
21 | | -List requirements to run the project, how to install them, instructions to use docker container, etc... |
| 16 | +- **Realtime Capture Mode** — Streaming/live capture sessions where metrics are recorded continuously in real time |
| 17 | +- **Trace Capture Mode** — Full trace sessions with detailed scheduling, slice, and counter data captured over a defined time window |
| 18 | + |
| 19 | +#### Supported Event Types |
| 20 | + |
| 21 | +| CSV Row Type | Perfetto Phase | Description | |
| 22 | +|---|---|---| |
| 23 | +| System counters | `"ph": "C"` | System-level metrics (CPU frequency, GPU metrics, DSP metrics) | |
| 24 | +| Process counters | `"ph": "C"` | Per-process counter values (e.g., `aaRdy`, GPU Rendering Pipe Metrics) | |
| 25 | +| Process slices | `"ph": "X"` | Duration events with start/end timestamps | |
| 26 | +| System scheduling slices | `"ph": "X"` | Kernel scheduling events (e.g., Sched CPU) | |
| 27 | +| Metadata | `"ph": "M"` | Auto-generated `process_name` and `thread_name` labels | |
22 | 28 |
|
23 | 29 | ## Installation Instructions |
24 | 30 |
|
25 | | -How to install the software itself. |
| 31 | +```bash |
| 32 | +# Install uv (if not already installed) |
| 33 | +# Windows |
| 34 | +powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" |
| 35 | + |
| 36 | +# macOS / Linux |
| 37 | +curl -LsSf https://astral.sh/uv/install.sh | sh |
| 38 | + |
| 39 | +# Sync the project (creates virtual environment and installs dependencies) |
| 40 | +uv sync |
| 41 | +``` |
26 | 42 |
|
27 | 43 | ## Usage |
28 | 44 |
|
29 | | -Describe how to use the project. |
| 45 | +All tools are accessible through the unified `main.py` entry point: |
| 46 | + |
| 47 | +```bash |
| 48 | +# Show available tools |
| 49 | +uv run main.py --help |
| 50 | + |
| 51 | +# Run a specific tool (e.g., converter) |
| 52 | +uv run main.py converter <tool-specific arguments ...> |
| 53 | +``` |
| 54 | + |
| 55 | +### Converter Examples |
| 56 | + |
| 57 | +```bash |
| 58 | +# Single file (output: trace1.json) |
| 59 | +uv run main.py converter trace1.csv |
| 60 | + |
| 61 | +# Single file with custom output name |
| 62 | +uv run main.py converter trace1.csv -o custom_output.json |
| 63 | + |
| 64 | +# Multiple files (each gets its own .json: trace1.json, trace2.json, trace3.json) |
| 65 | +uv run main.py converter trace1.csv trace2.csv trace3.csv |
| 66 | + |
| 67 | +# All CSV files in the current directory |
| 68 | +uv run main.py converter *.csv |
| 69 | + |
| 70 | +# Output to a specific directory |
| 71 | +uv run main.py converter *.csv --output-dir ./output/ |
| 72 | +``` |
| 73 | + |
| 74 | +You can also invoke the converter directly (bypassing the dispatcher): |
| 75 | + |
| 76 | +```bash |
| 77 | +uv run python -m tools.converter.convert_sdp_csv_to_perfetto_json trace1.csv |
| 78 | +``` |
30 | 79 |
|
31 | 80 | ## Development |
32 | 81 |
|
33 | | -How to develop new features/fixes for the software. Maybe different than "usage". Also provide details on how to contribute via a [CONTRIBUTING.md file](CONTRIBUTING.md). |
| 82 | +To contribute new features or fixes, please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on branching, submitting pull requests, and coding standards. |
34 | 83 |
|
35 | | -## Getting in Contact |
| 84 | +```bash |
| 85 | +# Clone the repository |
| 86 | +git clone https://github.com/SnapdragonGameStudios/Snapdragon_Profiler_Ecosystem.git |
| 87 | +cd Snapdragon_Profiler_Ecosystem |
| 88 | + |
| 89 | +# Sync the project (creates virtual environment and installs dev dependencies) |
| 90 | +uv sync |
| 91 | +``` |
| 92 | + |
| 93 | +## Testing |
36 | 94 |
|
37 | | -How to contact maintainers. E.g. GitHub Issues, GitHub Discussions could be indicated for many cases. However a mail list or list of Maintainer e-mails could be shared for other types of discussions. E.g. |
| 95 | +The project includes a comprehensive test suite using pytest. |
| 96 | + |
| 97 | +```bash |
| 98 | +# Run all tests |
| 99 | +uv run pytest |
| 100 | + |
| 101 | +# Run tests with verbose output |
| 102 | +uv run pytest -v |
| 103 | + |
| 104 | +# Run a specific test class |
| 105 | +uv run pytest tests/test_convert_sdp_csv_to_perfetto_json.py::TestExampleCSV -v |
| 106 | +``` |
| 107 | + |
| 108 | +## Getting in Contact |
38 | 109 |
|
39 | 110 | * [Report an Issue on GitHub](../../issues) |
40 | 111 | * [Open a Discussion on GitHub](../../discussions) |
41 | | -* [E-mail us](mailto:REPLACE-ME@qti.qualcomm.com) for general questions |
42 | 112 |
|
43 | 113 | ## License |
44 | 114 |
|
45 | | -*\<update with your project name and license\>* |
46 | | - |
47 | | -*\<REPLACE-ME\>* is licensed under the [BSD-3-clause License](https://spdx.org/licenses/BSD-3-Clause.html). See [LICENSE.txt](LICENSE.txt) for the full license text. |
| 115 | +*Snapdragon Profiler Ecosystem* is licensed under the [BSD-3-clause License](https://spdx.org/licenses/BSD-3-Clause.html). See [LICENSE.txt](LICENSE.txt) for the full license text. |
0 commit comments