mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-18 06:31:38 +03:00
chore: fix typos
This commit is contained in:
parent
7598fbed54
commit
adfa85e8ab
@ -17,7 +17,7 @@ import pygal.style
|
|||||||
from pygal import DateTimeLine
|
from pygal import DateTimeLine
|
||||||
|
|
||||||
from glances.exports.export import GlancesExport
|
from glances.exports.export import GlancesExport
|
||||||
from glances.globals import iteritems, time_serie_subsample
|
from glances.globals import iteritems, time_series_subsample
|
||||||
from glances.logger import logger
|
from glances.logger import logger
|
||||||
from glances.timer import Timer
|
from glances.timer import Timer
|
||||||
|
|
||||||
@ -120,7 +120,7 @@ class Export(GlancesExport):
|
|||||||
x_label_rotation=20,
|
x_label_rotation=20,
|
||||||
x_value_formatter=lambda dt: dt.strftime('%Y/%m/%d %H:%M:%S'),
|
x_value_formatter=lambda dt: dt.strftime('%Y/%m/%d %H:%M:%S'),
|
||||||
)
|
)
|
||||||
for k, v in iteritems(time_serie_subsample(data, self.width)):
|
for k, v in iteritems(time_series_subsample(data, self.width)):
|
||||||
chart.add(k, v)
|
chart.add(k, v)
|
||||||
chart.render_to_file(os.path.join(self.path, title + '.svg'))
|
chart.render_to_file(os.path.join(self.path, title + '.svg'))
|
||||||
return True
|
return True
|
||||||
|
@ -166,7 +166,7 @@ def subsample(data, 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):
|
def time_series_subsample(data, sampling):
|
||||||
"""Compute a simple mean subsampling.
|
"""Compute a simple mean subsampling.
|
||||||
|
|
||||||
Data should be a list of set (time, value)
|
Data should be a list of set (time, value)
|
||||||
|
Loading…
Reference in New Issue
Block a user