Skip to content

Commit

Permalink
Release v0.2.7: More Brokkr 0.3.0 compat and bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
CAM-Gerlach committed Apr 30, 2020
1 parent 417c3ca commit 24b145c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Sindri Changelog


## Version 0.2.7 (2020-04-29)

Compat and bugfix release with the following changes:

* Handle bytes values as GB rather than B as used by Brokkr >=0.3.x
* Fix warning parsing dates with timezone offset appended



## Version 0.2.6 (2020-03-20)

Compat and bugfix release with the following changes:
Expand Down
2 changes: 1 addition & 1 deletion src/sindri/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Version file."""

VERSION_INFO = (0, 2, 6)
VERSION_INFO = (0, 2, 7)
__version__ = '.'.join((str(version) for version in VERSION_INFO))
6 changes: 3 additions & 3 deletions src/sindri/config/website.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@

STANDARD_COL_CONVERSIONS = {
"runtime": (1 / (60 * 60), 2),
"bytes_read": (1 / 1e9, 2),
"bytes_written": (1 / 1e9, 2),
"bytes_remaining": (1 / 1e9, 2),
"bytes_read": (1, 2),
"bytes_written": (1, 2),
"bytes_remaining": (1, 2),
}

LOG_REPLACE_ITEMS = [
Expand Down
13 changes: 7 additions & 6 deletions src/sindri/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
/ (60 * 60 * 24))),
("trigger_delta", "valid_packets",
(lambda full_data: round(
-1 * full_data["bytes_remaining"].diff(1)
/ (sindri.utils.misc.TRIGGER_SIZE_MB * 1e6)).clip(lower=0))),
-1e3 * full_data["bytes_remaining"].diff(1)
/ sindri.utils.misc.TRIGGER_SIZE_MB).clip(lower=0))),
("trigger_rate_1min", "trigger_delta",
lambda full_data: full_data["trigger_delta"]
/ round(full_data["time"].diff(1).dt.total_seconds() / 60)),
Expand All @@ -58,8 +58,8 @@
full_data["trigger_delta"].rolling(60, min_periods=6).mean()
/ round(full_data["time"].diff(60).dt.total_seconds() / (60 * 60))),
("triggers_remaining", "bytes_remaining",
lambda full_data: round(full_data["bytes_remaining"]
/ (1e6 * sindri.utils.misc.TRIGGER_SIZE_MB))),
lambda full_data: round(full_data["bytes_remaining"] * 1e3
/ sindri.utils.misc.TRIGGER_SIZE_MB)),
)


Expand Down Expand Up @@ -100,8 +100,9 @@ def preprocess_status_data(raw_status_data, decimate=None,
status_data = raw_status_data.iloc[::decimate, :]
else:
status_data = raw_status_data
status_data["time"] = pd.to_datetime(status_data["time"],
format="%Y-%m-%d %H:%M:%S.%f")
status_data["time"] = pd.to_datetime(
status_data["time"],
format="%Y-%m-%d %H:%M:%S.%f%z").dt.tz_localize(None)
status_data.set_index("time", drop=False, inplace=True)
status_data = status_data[status_data.index.notnull()]

Expand Down

0 comments on commit 24b145c

Please sign in to comment.