From a4957665caebd182ca258c1638c94a20a62ce35b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Couturier?= Date: Wed, 14 Jul 2021 21:07:12 +0200 Subject: [PATCH] new --- measure_energy_iot/client_tcp4.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/measure_energy_iot/client_tcp4.py b/measure_energy_iot/client_tcp4.py index a070da9..b163376 100644 --- a/measure_energy_iot/client_tcp4.py +++ b/measure_energy_iot/client_tcp4.py @@ -6,6 +6,8 @@ import buffer from PIL import Image import sys from io import BytesIO +from pathlib import Path + HOST = "192.168.0.106" PORT = 2345 @@ -31,7 +33,7 @@ for i in range(nb_times): elapsed_time += time.time() - t -print("time in memory bmp",elapsed_time/nb_times) +print("compute bmp",elapsed_time/nb_times," / size of file ",Path('lena.bmp').stat().st_size) """ @@ -59,7 +61,7 @@ for i in range(nb_times): elapsed_time += time.time() - t -print("time noscale jpg",elapsed_time/nb_times) +print("compute noscale jpg",elapsed_time/nb_times, " / size of file ",Path('lena2.jpg').stat().st_size) @@ -73,7 +75,7 @@ for i in range(nb_times): im2.save(buf, "JPEG", quality=quality) elapsed_time += time.time() - t -print("time resize + pil",elapsed_time/nb_times) +print("compute scale jpg ",elapsed_time/nb_times, " / size of file ",Path('lena3.jpg').stat().st_size) @@ -98,7 +100,7 @@ with s: sbuf.put_bytes(f.read()) # print('File Sent') elapsed_time += time.time() - t - print("send lena.bmp ",elapsed_time/nb_times) + print("send bmp ",elapsed_time/nb_times) elapsed_time=0 t=time.time() @@ -114,7 +116,7 @@ with s: sbuf.put_bytes(f.read()) # print('File Sent') elapsed_time += time.time() - t - print("send noscale lena2.jpg ",elapsed_time/nb_times) + print("send noscale jpg ",elapsed_time/nb_times) elapsed_time=0 t=time.time() @@ -130,5 +132,5 @@ with s: sbuf.put_bytes(f.read()) # print('File Sent') elapsed_time += time.time() - t - print("send scale lena3.jpg ",elapsed_time/nb_times) + print("send scale jpg ",elapsed_time/nb_times) -- 2.39.5