Added logging to see how long compression took

CURA-2286
This commit is contained in:
Jaime van Kessel 2016-09-09 15:28:37 +02:00
parent 9de064fdba
commit 3747db0f4d

View file

@ -551,7 +551,9 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
if self._use_gzip:
file_name = "%s.gcode.gz" % Application.getInstance().getPrintInformation().jobName
compress_time = time()
single_string_file_data = gzip.compress(single_string_file_data.encode("utf-8"))
Logger.log("d", "It took %s seconds to compress the file", time() - compress_time)
# Pretend that this is a response, as zipping might take a bit of time.
self._last_response_time = time()
else: