Skip to main content

a tool that collects and visualizes TiFlash runtime infomation

Project description

Usage

# install from pypi
pip3 install flashprof
# collect tiflash logs from tiup cluster to current directory, which will also be parsed to json
flashprof collect --cluster $CLUSTER_NAME
# render all cluster runtime info, currently supports task DAG
flashprof render
# help
flashprof -h
flashprof <subcommand> -h

DAG

Currently only task runtime info is visualized as DAG. Tasks in a single query may span across several tiflash instances, and those with status != FINISHED or error_message != "" will be labelled with red border.

data layout

The collected/generated artifacts have the following layout

flashprof
└── cluster
    ├── cluster1_name
    │   ├── log (collected from tiflash log dir)
    │   │   ├── ip1.tiflash.log
    │   │   └── ip2.tiflash.log
    │   └── task_dag (parsed and combined task dag)
    │       ├── json
    │       │   ├── ip1.tiflash.log.task_dag.json
    │       │   ├── ip2.tiflash.log.task_dag.json
    │       │   └── cluster.task_dag.json
    │       ├── png (rendered png files)
    │       └── svg (rendered svg files)
    └── cluster2_name
...

Development

# install a local dev version of python package, then we can call flashprof
# rerun this when code is changed
# it internally creates a symbolic link to the current source code
pip3 install -e .
# remove if you want
pip3 uninstall flashprof

Packaging

TL;DR

pip3 install build
python3 -m build
twine check dist/*
twine upload dist/*
# upload to test.pypi.org for package publish related test
# twine upload --repository testpypi dist/*

Instructions

Please refer to https://packaging.python.org/guides/distributing-packages-using-setuptools/ for detaild instructions.

Internals

collect command collects tiflash logs according to the tiup configurations for the specified --cluster $CLUSTER_NAME, and logs are named $IP.tiflash.log in flashprof/cluster/$CLUSTER_NAME/log.

parse command parses all the tiflash logs collected above to the json format, which only contains task DAGs for now. The json files a then merged into a cluster.json in flashprof/cluster/$CLUSTER_NAME/task_dag/json.

render command renders cluster.json into dag graphs per query_tso in flashprof/cluster/$CLUSTER_NAME/$FORMAT.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flashprof-0.0.17.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flashprof-0.0.17-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file flashprof-0.0.17.tar.gz.

File metadata

  • Download URL: flashprof-0.0.17.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.10.1 urllib3/1.26.13 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8

File hashes

Hashes for flashprof-0.0.17.tar.gz
Algorithm Hash digest
SHA256 96df5a4009c6e0ce1051ac82c14154bfd35f9a3f64a92ff904ff3c58653d60da
MD5 01f4ec36fbfd773df3d7134b2d9dd625
BLAKE2b-256 8bfed74e18f3d196fb5cdaa003ec098f611f208ef2c6dce04147918c21c68003

See more details on using hashes here.

File details

Details for the file flashprof-0.0.17-py3-none-any.whl.

File metadata

  • Download URL: flashprof-0.0.17-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.10.1 urllib3/1.26.13 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8

File hashes

Hashes for flashprof-0.0.17-py3-none-any.whl
Algorithm Hash digest
SHA256 c41b83bddda8d62bf90b65da2c32c13080d1ff45c344fc66e232ea45ac77021f
MD5 2dfccd922526d07346630f14af35a672
BLAKE2b-256 6515734a02905d4ae1400e89eac32f55aafd095956799126bc660a55876f1cb7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page