[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] djm-logparser: more refactoring
Holger Levsen (@holger)
gitlab at salsa.debian.org
Mon Apr 3 22:14:51 BST 2023
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
63b29e66 by Holger Levsen at 2023-04-03T23:14:42+02:00
djm-logparser: more refactoring
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
1 changed file:
- bin/djm-logparser
Changes:
=====================================
bin/djm-logparser
=====================================
@@ -27,24 +27,29 @@ seperator() {
# main
#
-HOSTS=$(cut -d ',' -f2 $LOGFILE | sort -u | wc -l)
TOTAL=$(grep -c $LOGMONTH $LOGFILE)
HOURS=$(cut -b 1-13 $LOGFILE | sort -u | wc -l)
+HOSTS=$(cut -d ',' -f2 $LOGFILE | sort -u | wc -l)
ACTIONS=$(cut -d ',' -f3 $LOGFILE |sort -u|sed -s "s# #_#g")
REASONS=$(cut -d ',' -f4 $LOGFILE |sort -u|sed -s "s# #_#g")
echo "Still very simple statistics for djm logs at $LOGFILE in $LOGMONTH"
echo
-printf "$TWO_C" "hosts maintained:" "$HOSTS"
-printf "$TWO_C" "djm actions done:" "$TOTAL"
+echo "djm = documented jenkins maintenance"
+echo " jenkins.debian.net exists since 2012, djm since 2023-04"
+echo " so expect changes for some time."
+echo
+echo
+printf "$TWO_C" "djm actions:" "$TOTAL"
printf "$TWO_C" "hours with djm usage:" "$HOURS"
+printf "$TWO_C" "hosts maintained:" "$HOSTS"
seperator
for action in $ACTIONS ; do
grep_action="$(echo $action | sed -s 's#_# #g' | xargs echo)"
AMOUNT=$(cut -d ',' -f3 $LOGFILE |grep "$grep_action"|wc -l)
PERCENT=$(echo "scale=2 ; $AMOUNT/$TOTAL*100"|bc||echo 0)
- printf "$THREE_C" "$grep_action actions done:" "$PERCENT%" "($AMOUNT / $TOTAL)"
+ printf "$THREE_C" "$grep_action actions:" "$PERCENT%" "($AMOUNT / $TOTAL)"
done
seperator
@@ -52,8 +57,9 @@ for reason in $REASONS ; do
grep_reason="$(echo $reason | sed -s 's#_# #g' | xargs echo)"
AMOUNT=$(cut -d ',' -f4 $LOGFILE |grep "$grep_reason"|wc -l)
PERCENT=$(echo "scale=2 ; $AMOUNT/$TOTAL*100"|bc||echo 0)
- printf "$THREE_C" "$grep_reason reasons done:" "$PERCENT%" "($AMOUNT / $TOTAL)"
+ printf "$THREE_C" "$grep_reason reasons:" "$PERCENT%" "($AMOUNT / $TOTAL)"
done
seperator
# todo: sort actions and reasons by highest amount
+# todo: include the number of reproducible related jenkins jobs
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/63b29e66fab0cd9756ce4dc332976d75620e1443
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/63b29e66fab0cd9756ce4dc332976d75620e1443
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20230403/74b21418/attachment-0001.htm>
More information about the Qa-jenkins-scm
mailing list