[Piuparts-commits] [piuparts] 01/01: detect_(network|piuparts)_issues.in: measure runtimes too.
Holger Levsen
holger at layer-acht.org
Wed Mar 8 12:03:30 UTC 2017
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch develop
in repository piuparts.
commit ffbbdc31c4c6bc991ba21a86ecb540379d3bb7b1
Author: Holger Levsen <holger at layer-acht.org>
Date: Wed Mar 8 13:03:20 2017 +0100
detect_(network|piuparts)_issues.in: measure runtimes too.
Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
debian/changelog | 1 +
master-bin/detect_network_issues.in | 7 ++++++-
master-bin/detect_piuparts_issues.in | 5 +++++
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 7e4f2aa..61f7343 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -82,6 +82,7 @@ piuparts (0.76) UNRELEASED; urgency=medium
four times a day, which hasn't worked out for a long time.
* generate_daily_report.in: measure runtime of this script and the scripts
started by it.
+ * detect_(network|piuparts)_issues.in: measure runtimes too.
[ Michael Stapelberg ]
* Add support for logging update-alternatives calls using optional
diff --git a/master-bin/detect_network_issues.in b/master-bin/detect_network_issues.in
index 6a47b42..0fc38cc 100755
--- a/master-bin/detect_network_issues.in
+++ b/master-bin/detect_network_issues.in
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2009 Holger Levsen (holger at layer-acht.org)
+# Copyright 2009-2017 Holger Levsen (holger at layer-acht.org)
# Copyright © 2011-2017 Andreas Beckmann (anbe at debian.org)
#
# This program is free software; you can redistribute it and/or modify it
@@ -23,6 +23,7 @@
get_config_value MASTER global master-directory
get_config_value SECTIONS global sections
+STARTDATE=$(date -u +%s)
#
# detect network/mirror problems
@@ -55,6 +56,10 @@ for SECTION in $SECTIONS ; do
done
done
if [ -s $FILE ] ; then
+ FINALDATE=$(date -u +%s)
+ RUNTIME=$(date -u -d "$FINALDATE seconds - $STARTDATE seconds" +%T)
+ echo "Runtime: $RUNTIME"
+ echo
echo "Network problems on detected!"
echo "(By grep'ing for"
echo " 'Cannot initiate the connection to',"
diff --git a/master-bin/detect_piuparts_issues.in b/master-bin/detect_piuparts_issues.in
index 011df6d..d96ba18 100755
--- a/master-bin/detect_piuparts_issues.in
+++ b/master-bin/detect_piuparts_issues.in
@@ -23,6 +23,7 @@
get_config_value MASTER global master-directory
get_config_value SECTIONS global sections
+STARTDATE=$(date -u +%s)
#
# detect piuparts problems
@@ -71,6 +72,10 @@ for SECTION in $SECTIONS ; do
done
done
if [ -s $FILE ] ; then
+ FINALDATE=$(date -u +%s)
+ RUNTIME=$(date -u -d "$FINALDATE seconds - $STARTDATE seconds" +%T)
+ echo "Runtime: $RUNTIME"
+ echo
echo "piuparts problem detected!"
echo "(By grep'ing for 'tar: .*.tar.gz: Cannot open: No such file or directory'"
echo "and for some python errors and tracebacks in failed logs.)"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git
More information about the Piuparts-commits
mailing list