Commit aea66d79 authored by Joanne Hugé's avatar Joanne Hugé

Merge branch 'cleanup' into packet-exchange

parents dbd49052 3704a72b
# tsn-rt-measures repository
This repository contains various programs I wrote to measure the TSN capabilities
of three OLinuXino LIME2 boards I have.
## cyclictest like programs
clockres, latency-measure and packet-exchange are C programs wrote using
the same structure as cyclictest, and borrows large portions of the cyclictest
code:
......@@ -12,8 +17,29 @@ can have it's priority set as an option, default is to 99. It writes results in
* clockres is used to determine the resolution of the clock (CLOCK_MONOTONIC), by doing successive
calls to clock_gettime
* latency-measure is used to determine the maximum wakeup latency of a real-time thread. It is
a simplified version of cyclictest I wrote to have a better understanding and more control.
* packet-exchange has a client and a server, which exchange UDP ethernet packets using real-time threads,
and can send them on a ETF qdisc by setting a txtime timestamp.
* scripts contain useful bash scripts to be used on the boards
and can send them on a ETF qdisc by setting a txtime timestamp. software timestamps can be generated using
the SO_TIMESTAMPING option, and timestamps inside the userspace program, for measuring purposes. A RTT
option also exists to measure RTT of an UDP packet.
## Scripts
The scripts folder contains various useful bash scripts to avoid
typing long commands on the boards
## Measure analysis
The measure-analysis folder contains an automatically generated report with tables and
graphs of all measures done, which can be found in measure-analysis/measure-report.md
The report is generated by a python script on which json formatted sets of
measures can be imported (it can also parse and import cyclictest output)
The imported sets of measures are then stored in the measure folders, and the report
can then be generated with these measures.
Metadatas are included with the measures, such as the kernel version used, the boot parameters passed, various others parameters specific to the measure, etc... Measures measuring the same propriety are grouped together in tables and graphs, and are identified by their diverging metadatas. This is useful to analyse the effect of specific parameters on the measured propriety.
......@@ -240,7 +240,7 @@ class MeasureSetHandler:
if include_graphs:
self.generate_graphs(metadata_masks)
with open(self.measures_dir + "/" + "measure-report.md", 'w+') as report:
with open("measure-report.md", 'w+') as report:
report.write("## Measurements\n\n")
report.write("{}\n\n".format(MeasureSetHandler.report_description))
......@@ -287,10 +287,11 @@ class MeasureSetHandler:
# Include the graphs
if include_graphs:
for i in range(len(measures[0].props)):
report.write('\n![alt text](graphs/{}{}.png "{} Graph")\n'.format(mtype,
measures[0].props_names[i],
mtype,
measures[0].props_names[i]))
report.write('\n![alt text]({}/graphs/{}{}.png "{} Graph")\n'.format(MeasureSetHandler.measures_dir,
mtype,
measures[0].props_names[i],
mtype,
measures[0].props_names[i]))
report.write("\n")
report.write("\n")
......
......@@ -27,7 +27,7 @@ Emerald, 21h22, hackbench | 14.0000us | 112.0000us | 19.5352u
Onyx, 46h, hackbench | 14.0000us | 72.0000us | 20.5580us | 3.9283us
Emerald, 24h, ssh | 12.0000us | 80.0000us | 15.4101us | 1.2302us
![alt text](graphs/cyclictest_wake-up_latencywake-up latency.png "cyclictest_wake-up_latency Graph")
![alt text](measures/graphs/cyclictest_wake-up_latencywake-up latency.png "cyclictest_wake-up_latency Graph")
### packet_send_timestamps results
......@@ -43,9 +43,9 @@ Slate, 1000us, 1h00, 200us, pfifo_fast | 1.0000us - 32.0000us | 12.000
Slate, 1000us, 0h2, 200us, pfifo_fast | 1.0000us - 32.0000us | 12.0000us - 118.0000us | 1.9341us - 36.6011us | 0.0768us - 3.7223us
Onyx, 1000us, 72h24, 160us, etf | 1.0000us - 33.0000us | 65.0000us - 110.0000us | 1.9916us - 37.1342us | 3.1052us - 13.6433us
![alt text](graphs/packet_send_timestampsuser_space.png "packet_send_timestamps Graph")
![alt text](measures/graphs/packet_send_timestampsuser_space.png "packet_send_timestamps Graph")
![alt text](graphs/packet_send_timestampskernel_space.png "packet_send_timestamps Graph")
![alt text](measures/graphs/packet_send_timestampskernel_space.png "packet_send_timestamps Graph")
### packet_recv_timestamps results
......@@ -60,9 +60,9 @@ Metadata | Min | Max
1000us, 16h48, Slate, 200us, pfifo_fast | 0.0000us - 35.0000us | 41.0000us - 233.0000us | 0.0036us - 41.5560us | 0.0521us - 27.0303us
1000us, 72h24, Emerald, 160us, etf | 0.0000us - 41.0000us | 42.0000us - 291.0000us | 0.0235us - 50.7618us | 0.1085us - 55.3431us
![alt text](graphs/packet_recv_timestampsuser_space.png "packet_recv_timestamps Graph")
![alt text](measures/graphs/packet_recv_timestampsuser_space.png "packet_recv_timestamps Graph")
![alt text](graphs/packet_recv_timestampskernel_space.png "packet_recv_timestamps Graph")
![alt text](measures/graphs/packet_recv_timestampskernel_space.png "packet_recv_timestamps Graph")
### packet_jitter results
......@@ -78,7 +78,7 @@ Metadata | Min | Max | Avg
1000us, 16h48, Slate, 200us, pfifo_fast | -434.0000us | 237.0000us | 6.9930us | 81.8093us
1000us, 72h24, Emerald, 160us, etf | -397.0000us | 369.0000us | 7.4514us | 155.0147us
![alt text](graphs/packet_jitterjitter.png "packet_jitter Graph")
![alt text](measures/graphs/packet_jitterjitter.png "packet_jitter Graph")
### packet_rtt results
......@@ -91,6 +91,6 @@ Min | Max | Avg | Var
**rtt** | **rtt** | **rtt** | **rtt**
636.0000us | 972.0000us | 674.0051us | 241.7037us
![alt text](graphs/packet_rttrtt.png "packet_rtt Graph")
![alt text](measures/graphs/packet_rttrtt.png "packet_rtt Graph")
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment