A small graph package used to draw image for ndnsim metrics
Project description
ndnsim-graph
A small graph package used to draw image for ndnsim metrics
1. Install
pip install ndnsimgraph
2. Usage Example
2.1 Throughput
from ndnsimgraph.throughput import ThroughputGraph, ThroughputType, ThroughputTarget
# save picture to file
ThroughputGraph.parse("data_test0409/wfq-test2_throughput.txt"). \
setThroughputType(ThroughputType.OutData). \
setThroughputTarget(ThroughputTarget.Kilobytes). \
setSamplingInterval(0.5). \
plot("C1", 258). \
plot("C2", 258). \
plot("C3", 258). \
plot("C4", 258). \
title("test title"). \
xlabel("Throughputs"). \
ylabel("Times(s)"). \
legend(). \
drawAndSave("output", "test-throughput.svg"). \
close()
# show
ThroughputGraph.parse("data_test0409/wfq-test2_throughput.txt"). \
setThroughputType(ThroughputType.OutData). \
setThroughputTarget(ThroughputTarget.Kilobytes). \
setSamplingInterval(0.5). \
plot("C1", 258). \
plot("C2", 258). \
plot("C3", 258). \
plot("C4", 258). \
title("test title"). \
xlabel("Throughputs"). \
ylabel("Times(s)"). \
legend(). \
drawAndSave("output", "test-throughput.svg"). \
close()
2.2 Delay
from ndnsimgraph.delay import DelayGraph, DelayType, DelayTarget
DelayGraph.parse("data_content_delivery/delay_abilene.txt"). \
setDelayType(DelayType.LastDelay). \
setDelayTarget(DelayTarget.DelayMS). \
setSamplingInterval(0.1). \
plot("C1", 1). \
plot("C1", 2). \
title("test title"). \
xlabel("Delay(ms)"). \
ylabel("Times(s)"). \
legend(). \
drawAndSave("output", "test-delay.svg"). \
close()
3. Upload new packet
python3 setup.py sdist bdist_wheel
twine upload dist/*
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
ndnsimgraph-0.0.5.tar.gz
(8.8 kB
view hashes)
Built Distribution
Close
Hashes for ndnsimgraph-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | addf1c7e55cb25297294845d08990dddf16ebdd3d6ddc42d1f88acbe0b609e11 |
|
MD5 | 2d7ce3f6759bb43cb745c7d166a32ee3 |
|
BLAKE2b-256 | 2a20b46c2d68d4747d06d00ba63f6e918eb9728fb9e71766d9fc1323b3e02373 |