run: add TCP_MAERTS to netperf test

MAERTS is STREAM backwards and effectively lets the netserver sends the packets
to the netperf client. So, TCP_STREAM measure the receive performance of the
lwIP stack on Genode and TCP_MAERTS the send performance of the lwIP stack
on Genode.
This commit is contained in:
Alexander Boettcher 2013-06-26 09:19:05 +02:00 committed by Stefan Kalkowski
parent 198f8b65a4
commit e35dbd3353
2 changed files with 22 additions and 18 deletions

View File

@ -67,7 +67,7 @@ set config {
<resource name="RAM" quantum="1M"/>
<provides> <service name="Timer"/> </provides>
</start>
<start name="netperf">
<start name="netserver_genode">
<resource name="RAM" quantum="16M"/>
<config>
<arg value="netserver"/>
@ -135,7 +135,7 @@ set boot_modules {
core init timer
ld.lib.so libc.lib.so libm.lib.so
lwip.lib.so libc_log.lib.so
netperf
netserver_genode
}
# platform-specific modules
@ -175,26 +175,30 @@ if [is_qemu_available] {
# start netperf client connecting to netperf server running native on Genode
set packet_size 1024
spawn bin/netperf_host -H $ip_addr -P 1 -v 2 -t TCP_STREAM -c -C -- -m $packet_size -S 0,65520 -P 49153,49153
set netperf_id $spawn_id
set netperf_tests "TCP_STREAM TCP_MAERTS"
run_genode_until "Segment" 60 $netperf_id
foreach netperf_test $netperf_tests {
spawn bin/netperf_host -H $ip_addr -P 1 -v 2 -t $netperf_test -c -C -- -m $packet_size -S 0,65520 -P 49153,49153
set netperf_id $spawn_id
# format output understandable for post proccessing scripts
set throughput [regexp -all -inline {([0-9]+[ ]+){3}[0-9]+\.[0-9]+[ ]+[0-9]+\.[0-9]+} $output]
set throughput [regexp -all -inline {[0-9]+\.[0-9]+} $throughput]
puts "! PERF: tcp_stream [lindex $throughput 1] MBit/s ok"
run_genode_until "Segment" 60 $netperf_id
# calculate packets per second rate and print it
set all_bytes [regexp -all -inline {([0-9]+[ ]+){5}} $output]
set all_bytes [lindex $all_bytes 0 4]
# format output understandable for post proccessing scripts
set throughput [regexp -all -inline {([0-9]+[ ]+){3}[0-9]+\.[0-9]+[ ]+[0-9]+\.[0-9]+} $output]
set throughput [regexp -all -inline {[0-9]+\.[0-9]+} $throughput]
puts "! PERF: tcp_stream [lindex $throughput 1] MBit/s ok"
set elapsed_time [regexp -all -inline {([0-9]+[ ]+){3}[0-9]+\.[0-9]+[ ]+} $output]
set elapsed_time [lindex $elapsed_time 0 3]
# calculate packets per second rate and print it
set all_bytes [regexp -all -inline {([0-9]+[ ]+){5}} $output]
set all_bytes [lindex $all_bytes 0 4]
puts "\ncalculation: overall bytes / size per packet / time = packets per second"
puts -nonewline " $all_bytes Bytes / $packet_size Bytes / $elapsed_time s = "
puts "[format %8.0f [expr $all_bytes / $packet_size / $elapsed_time]] packets/s"
set elapsed_time [regexp -all -inline {([0-9]+[ ]+){3}[0-9]+\.[0-9]+[ ]+} $output]
set elapsed_time [lindex $elapsed_time 0 3]
puts "\ncalculation: overall bytes / size per packet / time = packets per second"
puts -nonewline " $all_bytes Bytes / $packet_size Bytes / $elapsed_time s = "
puts "[format %8.0f [expr $all_bytes / $packet_size / $elapsed_time]] packets/s\n"
}
puts "\nTest succeeded"

View File

@ -1,4 +1,4 @@
TARGET = netperf
TARGET = netserver_genode
CONTRIB_DIR = $(REP_DIR)/contrib/netperf