]> rtime.felk.cvut.cz Git - can-benchmark.git/blobdiff - latester/latester.c
Speedup cpu-load experiments by stopping hackbench during maintenance
[can-benchmark.git] / latester / latester.c
index d09b1ab1a3027fedf670a657e4f6ee348306d10a..30e62f1f4462ca1de067fa92f64b278021ead61e 100644 (file)
@@ -884,6 +884,13 @@ int main(int argc, const char *argv[])
                error(1, errno, "pipe fcntl");
 
        init_ftrace();
+       if (getenv("LATESTER_CONTROL_HACKBENCH")) {
+               char cmd[1000];
+               sprintf(cmd, "ssh -x -a -S $HOME/.ssh/cangw-connection root@192.168.2.3 'kill -CONT -%s'",
+                       getenv("LATESTER_CONTROL_HACKBENCH"));
+               printf("Running: %s\n", cmd);
+               system(cmd);
+       }
 
        pthread_create(&thread, 0, measure_thread, NULL);
 
@@ -933,6 +940,14 @@ int main(int argc, const char *argv[])
 
        pthread_join(thread, NULL);
 
+       if (getenv("LATESTER_CONTROL_HACKBENCH")) {
+               char cmd[1000];
+               sprintf(cmd, "ssh -x -a -S $HOME/.ssh/cangw-connection root@192.168.2.3 'kill -STOP -%s'",
+                       getenv("LATESTER_CONTROL_HACKBENCH"));
+               printf("Running: %s\n", cmd);
+               system(cmd);
+       }
+
        close(completion_pipe[0]);
        close(completion_pipe[1]);