Skip to content

Commit

Permalink
fix more pylint warnings
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@21798 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Feb 22, 2019
1 parent e624de7 commit 02526d7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/xpra/server/window/window_stats.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# This file is part of Xpra.
# Copyright (C) 2011 Serviware (Arthur Huillet, <ahuillet@serviware.com>)
# Copyright (C) 2010-2017 Antoine Martin <antoine@xpra.org>
# Copyright (C) 2010-2019 Antoine Martin <antoine@xpra.org>
# Copyright (C) 2008 Nathaniel Smith <njs@pobox.com>
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any
# later version. See the file COPYING for details.
Expand Down Expand Up @@ -166,8 +166,8 @@ def get_info(self):
}
}
#encoding stats:
if self.encoding_stats:
estats = tuple(self.encoding_stats)
estats = tuple(self.encoding_stats)
if estats:
encodings_used = [x[1] for x in estats]
def add_compression_stats(enc_stats, encoding=None):
comp_ratios_pct = []
Expand All @@ -194,9 +194,9 @@ def add_compression_stats(enc_stats, encoding=None):
add_compression_stats(enc_stats, encoding)

dinfo = info.setdefault("damage", {})
latencies = [x*1000 for _, _, _, x in tuple(self.damage_in_latency)]
latencies = tuple(x[-1]*1000 for x in tuple(self.damage_in_latency))
dinfo["in_latency"] = get_list_stats(latencies, show_percentile=[9])
latencies = [x*1000 for _, _, _, x in tuple(self.damage_out_latency)]
latencies = tuple(x[-1]*1000 for x in tuple(self.damage_out_latency))
dinfo["out_latency"] = get_list_stats(latencies, show_percentile=[9])
#per encoding totals:
if self.encoding_totals:
Expand All @@ -215,9 +215,9 @@ def get_target_client_latency(self, min_client_latency, avg_client_latency, abs_
Then we add the average decoding latency.
"""
decoding_latency = 0.010
if not self.client_decode_time:
decoding_latency, _ = calculate_timesize_weighted_average(tuple(self.client_decode_time))
decoding_latency /= 1000.0
cdt = tuple(self.client_decode_time)
if cdt:
decoding_latency = calculate_timesize_weighted_average(cdt)[0]/1000.0
min_latency = max(abs_min, min_client_latency or abs_min)*1.2
avg_latency = max(min_latency, avg_client_latency or abs_min)
max_latency = 2.0*min_latency
Expand Down

0 comments on commit 02526d7

Please sign in to comment.