]> rtime.felk.cvut.cz Git - can-benchmark.git/blobdiff - gw-tests/lib.py
Minor, mostly cosmetic, changes to RTEMS bench scripts.
[can-benchmark.git] / gw-tests / lib.py
index 700eacb61d2cbbb470252e92cc55c0bc60ae0c85..4cccc2756ab79a918d5482c87c1b488cfc25d765 100644 (file)
@@ -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())