Skip to content

Commit

Permalink
#3337 add options to 'compress' debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Nov 9, 2021
1 parent ddf2008 commit c8b1823
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions xpra/server/window/window_source.py
Expand Up @@ -2561,8 +2561,8 @@ def nodata(msg, *args):
client_options['damage_time'] = int(damage_time * 1000)
client_options['process_damage_time'] = int(process_damage_time * 1000)
client_options['damage_packet_time'] = int(end * 1000)
compresslog("compress: %5.1fms for %4ix%-4i pixels at %4i,%-4i for wid=%-5i using %9s with ratio %5.1f%% (%5iKB to %5iKB), sequence %5i, client_options=%s",
(end-start)*1000.0, outw, outh, x, y, self.wid, coding, 100.0*csize/psize, psize//1024, csize//1024, self._damage_packet_sequence, client_options)
compresslog("compress: %5.1fms for %4ix%-4i pixels at %4i,%-4i for wid=%-5i using %9s with ratio %5.1f%% (%5iKB to %5iKB), sequence %5i, client_options=%s, options=%s",
(end-start)*1000.0, outw, outh, x, y, self.wid, coding, 100.0*csize/psize, psize//1024, csize//1024, self._damage_packet_sequence, client_options, options)
self.statistics.encoding_stats.append((end, coding, w*h, bpp, csize, end-start))
return self.make_draw_packet(x, y, outw, outh, coding, data, outstride, client_options, options)

Expand Down
4 changes: 2 additions & 2 deletions xpra/server/window/window_video_source.py
Expand Up @@ -1975,8 +1975,8 @@ def encode_scrolling(self, scroll_data, image, options, match_pct, max_zones=20)
packet = self.make_draw_packet(x, y, w, h,
coding, LargeStructure(coding, scrolls), 0, client_options, options)
self.queue_damage_packet(packet, 0, 0, options)
compresslog("compress: %5.1fms for %4ix%-4i pixels at %4i,%-4i for wid=%-5i using %9s as %3i rectangles (%5iKB to 0KB), sequence %5i, client_options=%s",
(end-start)*1000.0, w, h, x, y, self.wid, coding, len(scrolls), w*h*4/1024, self._damage_packet_sequence, client_options)
compresslog("compress: %5.1fms for %4ix%-4i pixels at %4i,%-4i for wid=%-5i using %9s as %3i rectangles (%5iKB to 0KB), sequence %5i, client_options=%s, options=%s",
(end-start)*1000.0, w, h, x, y, self.wid, coding, len(scrolls), w*h*4/1024, self._damage_packet_sequence, client_options, options)
del scrolls
#send the rest as rectangles:
if non_scroll:
Expand Down

0 comments on commit c8b1823

Please sign in to comment.