mirror of https://github.com/nicolargo/glances
chore: missed out formatting
parent
be5ae310ba
commit
3f93a3989c
|
@ -58,7 +58,6 @@ if psutil_version_info < psutil_min_version:
|
|||
import tracemalloc
|
||||
|
||||
|
||||
|
||||
def __signal_handler(signal, frame):
|
||||
logger.debug("Signal {} catched".format(signal))
|
||||
end()
|
||||
|
|
|
@ -158,7 +158,7 @@ def subsample(data, sampling):
|
|||
if len(data) <= sampling:
|
||||
return data
|
||||
sampling_length = int(round(len(data) / float(sampling)))
|
||||
return [mean(data[s * sampling_length: (s + 1) * sampling_length]) for s in range(0, sampling)]
|
||||
return [mean(data[s * sampling_length : (s + 1) * sampling_length]) for s in range(0, sampling)]
|
||||
|
||||
|
||||
def time_serie_subsample(data, sampling):
|
||||
|
@ -173,8 +173,8 @@ def time_serie_subsample(data, sampling):
|
|||
t = [t[0] for t in data]
|
||||
v = [t[1] for t in data]
|
||||
sampling_length = int(round(len(data) / float(sampling)))
|
||||
t_subsampled = [t[s * sampling_length: (s + 1) * sampling_length][0] for s in range(0, sampling)]
|
||||
v_subsampled = [mean(v[s * sampling_length: (s + 1) * sampling_length]) for s in range(0, sampling)]
|
||||
t_subsampled = [t[s * sampling_length : (s + 1) * sampling_length][0] for s in range(0, sampling)]
|
||||
v_subsampled = [mean(v[s * sampling_length : (s + 1) * sampling_length]) for s in range(0, sampling)]
|
||||
return list(zip(t_subsampled, v_subsampled))
|
||||
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ class GlancesStdoutIssue(object):
|
|||
result = (colors.RED + '[ERROR]' + colors.BLUE + ' {:.5f}s '.format(counter.get())).rjust(
|
||||
41 - len(plugin)
|
||||
)
|
||||
message = colors.NO + str(stat_error)[0: TERMINAL_WIDTH - 41]
|
||||
message = colors.NO + str(stat_error)[0 : TERMINAL_WIDTH - 41]
|
||||
|
||||
# Display the result
|
||||
self.print_issue(plugin, result, message)
|
||||
|
|
|
@ -325,9 +325,7 @@ class DockerContainersExtension:
|
|||
stats['io_w'] = stats['io'].get('iow')
|
||||
stats['network_rx'] = stats['network'].get('rx')
|
||||
stats['network_tx'] = stats['network'].get('tx')
|
||||
stats['Uptime'] = pretty_date(
|
||||
parser.parse(started_at).astimezone(tz.tzlocal()).replace(tzinfo=None)
|
||||
)
|
||||
stats['Uptime'] = pretty_date(parser.parse(started_at).astimezone(tz.tzlocal()).replace(tzinfo=None))
|
||||
else:
|
||||
stats['io'] = {}
|
||||
stats['cpu'] = {}
|
||||
|
|
|
@ -1131,11 +1131,7 @@ class GlancesPluginModel(object):
|
|||
duration = counter.get()
|
||||
logger.debug(
|
||||
"{} {} {} return {} in {} seconds".format(
|
||||
args[0].__class__.__name__,
|
||||
args[0].__class__.__module__,
|
||||
fct.__name__,
|
||||
ret,
|
||||
duration
|
||||
args[0].__class__.__name__, args[0].__class__.__module__, fct.__name__, ret, duration
|
||||
)
|
||||
)
|
||||
return ret
|
||||
|
|
Loading…
Reference in New Issue