Skip to main content

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

Alt text Alt text Alt text Alt text

References

https://cpe.ext.hpe.com/docs/latest/getting_started/HPE-Cassini-Performance-Counters.html

https://github.com/argonne-lcf/net-prof

https://pypi.org/project/net-prof/

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

net_prof-0.1.3.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

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

net_prof-0.1.3-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file net_prof-0.1.3.tar.gz.

File metadata

  • Download URL: net_prof-0.1.3.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for net_prof-0.1.3.tar.gz
Algorithm Hash digest
SHA256 c7549b96e90e0b54864fdf250faf54eef6dffa11b61971374f95bc70446e5f46
MD5 72623c87f5e12dbb18a54b1260e39716
BLAKE2b-256 701e2fa53116f796e35a115e1d3eb58c148a9a3b52a1f4dccafdf28e152cf454

See more details on using hashes here.

File details

Details for the file net_prof-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: net_prof-0.1.3-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

Hashes for net_prof-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7a4811ac9f0dc27e0283a06b52cd4ab937cc7dfaaa5b13e0032730af1ac21d0e
MD5 feaeb86dac771573acc070a62ef2b677
BLAKE2b-256 99fb144009574ba20fecd212326181b6f00ee27a842398795bcc7d26175ab8ce

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