Analyze Power BI Performance Analyzer JSON traces (export + run-level cache-aware summaries).
Project description
pbi-perf-trace
Utilities for analyzing Power BI Performance Analyzer JSON exports.
Install (dev)
pip install -e .[dev]
Development
- Run lint:
ruff check . - Run tests (venv):
.\.venv\Scripts\python.exe -m pytest -q - Build dist:
.\.venv\Scripts\python.exe -m build
CLI
Autorun (no args): export + analyze via config
If you run python main.py (or pbi-perf-trace) with no arguments, the tool will look for a
pbi-perf-trace.json file in the current directory and run both export + analyze.
Example pbi-perf-trace.json:
{
"files": {
"measure_on_import": "C:/traces/perf_measure_on_import.json",
"measure_on_direct": "C:/traces/perf_measure_on_direct.json"
},
"export_output": "output.csv",
"out_dir": "out"
}
Export: traces -> pivoted CSV
pbi-perf-trace export --base-path "C:\\path\\to\\folder" --files "perf_measure_on_import.json=measure_on_import" --files "perf_measure_on_direct.json=measure_on_direct" --output output.csv
Analyze: run-level cache-aware summaries
pbi-perf-trace analyze --base-path "C:\\path\\to\\folder" --files "perf_measure_on_import.json=measure_on_import" --files "perf_measure_on_direct.json=measure_on_direct" --out-dir out
Outputs written to --out-dir:
kept_summary.csvcold_reason_summary.csvtag_official.csvcache_official.csv
Library usage
Run both export + analyze (Python API)
pbi_perf_trace() is the main pip-friendly API. It accepts a dict mapping tag -> trace_json_path.
- If
output_pathis provided, it writes CSV outputs into that directory. - It always returns DataFrames in-memory.
from pathlib import Path
from pbi_perf_trace import pbi_perf_trace
outputs = pbi_perf_trace(
{
"measure_on_import": Path(r"C:\\traces\\perf_measure_on_import.json"),
"measure_on_direct": Path(r"C:\\traces\\perf_measure_on_direct.json"),
},
output_path="out",
)
# DataFrames are also returned in-memory:
print(outputs.tag_official.head())
License
MIT. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pbi_perf_trace-0.1.0.tar.gz.
File metadata
- Download URL: pbi_perf_trace-0.1.0.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fca195aa330d0548c57b5364452dbd08fb37f52c661fbd7a6dee75c3c7d37892
|
|
| MD5 |
9e446e7d980be824740be581b7bc73ec
|
|
| BLAKE2b-256 |
d3ddf50f366324e0ef00747ac5b92bd992968bc68d9b29b84740744165b1301b
|
Provenance
The following attestation bundles were made for pbi_perf_trace-0.1.0.tar.gz:
Publisher:
publish.yml on IT-Matter-AS/pbi-perf-trace
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pbi_perf_trace-0.1.0.tar.gz -
Subject digest:
fca195aa330d0548c57b5364452dbd08fb37f52c661fbd7a6dee75c3c7d37892 - Sigstore transparency entry: 1008505117
- Sigstore integration time:
-
Permalink:
IT-Matter-AS/pbi-perf-trace@76c222bf41d728393943f8c0d49677fc0de3b468 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/IT-Matter-AS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@76c222bf41d728393943f8c0d49677fc0de3b468 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pbi_perf_trace-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pbi_perf_trace-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
416f44966c44dc3d4b1aa539ed58b30737905e905065472f8dc54ee47fa331d4
|
|
| MD5 |
58d05cf298ddf77a5170cc94f30fb969
|
|
| BLAKE2b-256 |
9dfd87343c6a2d157ca7e0605a75a06702523e786c6d27985bf20f796f9638b8
|
Provenance
The following attestation bundles were made for pbi_perf_trace-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on IT-Matter-AS/pbi-perf-trace
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pbi_perf_trace-0.1.0-py3-none-any.whl -
Subject digest:
416f44966c44dc3d4b1aa539ed58b30737905e905065472f8dc54ee47fa331d4 - Sigstore transparency entry: 1008505125
- Sigstore integration time:
-
Permalink:
IT-Matter-AS/pbi-perf-trace@76c222bf41d728393943f8c0d49677fc0de3b468 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/IT-Matter-AS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@76c222bf41d728393943f8c0d49677fc0de3b468 -
Trigger Event:
release
-
Statement type: