X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/blobdiff_plain/4b9389362dbefcb559e4167296484f2aca475b5e..597f695d267970a7dd260f938e50efadc4fefa7d:/gw-tests/lib.py diff --git a/gw-tests/lib.py b/gw-tests/lib.py index 700eacb..4cccc27 100644 --- a/gw-tests/lib.py +++ b/gw-tests/lib.py @@ -1,3 +1,7 @@ +""" +Contains various helper functions and information for benchmarking RTEMS CAN GW implementation. +""" + import subprocess import sys import os @@ -152,4 +156,8 @@ def read_hostname(): def original_name_from_histogram_name(hist_name): """Retuns name of the original test from the name of its histogram.""" - return "-".join(hist_name.split("-")[:-1]) \ No newline at end of file + return "-".join(hist_name.split("-")[:-1]) + +def set_txqueuelen(length): + """Sets txqueuelen on can0 interface to given length""" + subprocess.call("ifconfig can0 txqueuelen {}".format(length).split())