from PIL import Image
import time
import cv2
+import subprocess
import sys
print("time cv2",elapsed_time)
-
+elapsed_time=0
for i in range(100):
t = time.process_time()
resized = cv2.resize(img, (256,256), interpolation=cv2.INTER_LINEAR)
elapsed_time += time.process_time() - t
print("time resize + cv2",elapsed_time)
+
+elapsed_time=0
+for i in range(10):
+ t = time.process_time()
+ proc=subprocess.Popen("scp lena4.jpg bilbo.iut-bm.univ-fcomte.fr:/tmp", shell=True)
+ proc.wait()
+ elapsed_time += time.process_time() - t
+
+print("ssh normal",elapsed_time)
+
+
+elapsed_time=0
+for i in range(10):
+ t = time.process_time()
+ proc=subprocess.Popen("scp lena5.jpg bilbo.iut-bm.univ-fcomte.fr:/tmp", shell=True)
+ proc.wait()
+ elapsed_time += time.process_time() - t
+
+print("ssh reduce",elapsed_time)