]> git.saurik.com Git - apple/xnu.git/blobdiff - tools/tests/perf_index/test_controller.py
xnu-7195.101.1.tar.gz
[apple/xnu.git] / tools / tests / perf_index / test_controller.py
index 18493c991dd08e1338c030552470bbdcbf38a449..73d2a1b3451d9ac4a7f1c185bbc148486f073492 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/python
 #!/usr/bin/python
-
+from __future__ import absolute_import, print_function
 import socket
 import time
 import select
 import socket
 import time
 import select
@@ -27,7 +27,7 @@ def main(num_clients, test_type, num_threads, job_size, args):
     msg = "\0".join(["%s\0%d\0%d" % (test_type, num_threads, job_size)] + args) + "\0\0"
     client_socket.send(msg)
     client_sockets.append(client_socket)
     msg = "\0".join(["%s\0%d\0%d" % (test_type, num_threads, job_size)] + args) + "\0\0"
     client_socket.send(msg)
     client_sockets.append(client_socket)
-  
+
   control_socket.close()
 
   waitformsgs(client_sockets, "Ready")
   control_socket.close()
 
   waitformsgs(client_sockets, "Ready")
@@ -47,7 +47,7 @@ def main(num_clients, test_type, num_threads, job_size, args):
   return end_time - start_time
 
 def usage():
   return end_time - start_time
 
 def usage():
-  sys.stderr.write("usage: start_tests.py num_clients type threads size\n")  
+  sys.stderr.write("usage: start_tests.py num_clients type threads size\n")
   exit(1)
 
 if __name__ == "__main__":
   exit(1)
 
 if __name__ == "__main__":
@@ -62,4 +62,4 @@ if __name__ == "__main__":
   except ValueError:
     usage()
 
   except ValueError:
     usage()
 
-  print main(num_clients, test_type, num_threads, job_size, args)
+  print(main(num_clients, test_type, num_threads, job_size, args))