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.
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
net_prof-0.1.2.tar.gz
(13.0 kB
view details)
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
net_prof-0.1.2-py3-none-any.whl
(14.8 kB
view details)
File details
Details for the file net_prof-0.1.2.tar.gz.
File metadata
- Download URL: net_prof-0.1.2.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d6a0d0600b0d3b6824e375bd20a46b4eb691d6be34fe0ebb4d94da920381d4f
|
|
| MD5 |
41f0ed08a9cb61b09a5738be82bbdcbd
|
|
| BLAKE2b-256 |
c1c9014a9ab179e9d95d2e0dc19b9615351f2dc1fa08fa68bc67887c8dd04243
|
File details
Details for the file net_prof-0.1.2-py3-none-any.whl.
File metadata
- Download URL: net_prof-0.1.2-py3-none-any.whl
- Upload date:
- Size: 14.8 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 |
ecf1e8c8d783735310aae26a6b8db0bc4cb2084d813a7e34389d741cd3a8f76b
|
|
| MD5 |
074eb44b6df4731c895296c36725ca70
|
|
| BLAKE2b-256 |
1f7457a1200783f8b0a1858739533e775e7b44614ab6fd55222094a43a5fbb46
|