My cool package
Project description
net-prof
net-prof is a network profiler library aimed to profile the HPE Cray Cassini Network Interface Card (NIC) on a compute node to collect, analyze and visualize the network counter events. This tool will help to compare and diagnose a successful workload without any network issues with an unsuccessful workload due to a network issue.
Release v0.1.2
- Added support for multi-interface profiling.
- Fixed prior issues that prevented importation.
To Install
pip install net-prof
Functions
collect(input_directory, "counters.json")
summarize(before, after)
dump(summary)
dump_html(summary, output_html)
To Use
# Example Utilizing a single NIC/interface (cxi0). collect() now supports functionality for single NIC and multi NIC's!
import net_prof
script_dir = os.path.dirname(os.path.abspath(__file__))
collect("../cxi/cxi0/device/telemetry", os.path.join(script_dir, "before.json"))
# dist.all_reduce(x, op=dist.ReduceOp.SUM) - or - os.execute('ping google.com')
# ^ Process that should cause changes to the network runs
collect("../cxi/cxi0/device/telemetry", os.path.join(script_dir, "after.json"))
before = os.path.join(script_dir, "before.json")
after = os.path.join(script_dir, "after.json")
output_html = os.path.join(script_dir, "report.html")
os.makedirs(os.path.join(script_dir, "charts"), exist_ok=True)
summary = summarize(before, after)
dump(summary)
dump_html(summary, output_html)
# Example Utilizing 8 NIC/interfaces!
import net_prof
script_dir = os.path.dirname(os.path.abspath(__file__))
collect("../sys/class/cxi", os.path.join(script_dir, "before.json"))
# dist.all_reduce(x, op=dist.ReduceOp.SUM) - or - os.execute('ping google.com')
collect("../sys/class/cxi", os.path.join(script_dir, "after.json"))
before = os.path.join(script_dir, "before.json")
after = os.path.join(script_dir, "after.json")
summary = summarize(before, after)
# Ensure output directory for charts exists within tests/ or project root
output_html = os.path.join(script_dir, "report_all.html")
os.makedirs(os.path.join(script_dir, "charts"), exist_ok=True)
dump_html(summary, output_html)
Features in Devolopment:
FIX -- report.html & report_2.html share the same charts when they shouldn't... (different data)
ADD -- Create a single unified test instead of having a bunch of tests.
ADD -- Adding more charts with mpl.
Profiler Snapshots
References
https://cpe.ext.hpe.com/docs/latest/getting_started/HPE-Cassini-Performance-Counters.html
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 net_prof-0.1.4.tar.gz.
File metadata
- Download URL: net_prof-0.1.4.tar.gz
- Upload date:
- Size: 13.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8685102cf341f25bfbcf7b50677ece0abf4d0b367c02559b9497bb1628b852f
|
|
| MD5 |
420b79c30a6b580df418f9104f7255f6
|
|
| BLAKE2b-256 |
ba1340160f55cd84ca896802be9c2e5ce39ecb45e5b9a083ec8b53bdb20ba185
|
File details
Details for the file net_prof-0.1.4-py3-none-any.whl.
File metadata
- Download URL: net_prof-0.1.4-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3978b50c51ce1515f0699a5169aeff441d8e0561ecaef8f73e051b6d12e66d2
|
|
| MD5 |
511dbbd5ade6762364942d7a9f043e14
|
|
| BLAKE2b-256 |
74a1e509ecae60ddb54ba371a12b04796f50177c8cbe1e238d334fc496fe3949
|