Hello Ottomata,
I'd like you to do a code review. Please visit
https://gerrit.wikimedia.org/r/188003
to review the following change.
Change subject: Allow to mark day changes when dumping webrequest status
......................................................................
Allow to mark day changes when dumping webrequest status
Change-Id: Ia704f6602ced4cb076e41ccd47cdd75b4739fd1d
---
M bin/refinery-dump-status-webrequest-partitions
1 file changed, 14 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery
refs/changes/03/188003/1
diff --git a/bin/refinery-dump-status-webrequest-partitions
b/bin/refinery-dump-status-webrequest-partitions
index 14a7c52..c13dc9f 100755
--- a/bin/refinery-dump-status-webrequest-partitions
+++ b/bin/refinery-dump-status-webrequest-partitions
@@ -12,6 +12,8 @@
--hdfs-mount MOUNT_POINT
-- Assume that HDFS is mounted at MOUNT_POINT (needs
to be an absolute path) instead of /mnt/hdfs .
+ --mark-day-changes
+ -- Adds a hline between days.
--datasets DATASET1,DATASET2,...
-- Select the datasets to output data for.
The following datasets are available:
@@ -39,6 +41,8 @@
HAS_FAULTY=
QUIET=
QUIET_BUFFER=
+
+MARK_DAY_CHANGES=no
ALL_DATASETS=()
@@ -121,6 +125,9 @@
[[ $# -gt 0 ]] || error "$PARAM expects a further parameter"
HDFS_MOUNT_DIR_ABS="$1"
shift
+ ;;
+ "--mark-day-changes" )
+ MARK_DAY_CHANGES=yes
;;
"--quiet" )
QUIET=yes
@@ -329,6 +336,13 @@
for HOURS_OFFSET in $(seq $HOUR_OFFSET_MAX -1 $HOUR_OFFSET_MIN )
do
DATE="$(date --utc -d "$HOURS_OFFSET hours-ago" +'%Y-%m-%d %H')"
+
+ # -- Mark day change if requested
+ if [ "$MARK_DAY_CHANGES" = "yes" -a "${DATE: -2}" = "00" -a
"$HOURS_OFFSET" != "$HOUR_OFFSET_MAX" ]
+ then
+ hline
+ fi
+
log_no_lf " || ${DATE// /T}/1H ||"
for DATASET in "${ALL_DATASETS[@]}"
do
--
To view, visit https://gerrit.wikimedia.org/r/188003
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia704f6602ced4cb076e41ccd47cdd75b4739fd1d
Gerrit-PatchSet: 1
Gerrit-Project: analytics/refinery
Gerrit-Branch: master
Gerrit-Owner: QChris <[email protected]>
Gerrit-Reviewer: Ottomata <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits