Ori.livneh has uploaded a new change for review.
https://gerrit.wikimedia.org/r/179967
Change subject: xenon: add title to graphs; set mindwidth=2
......................................................................
xenon: add title to graphs; set mindwidth=2
* Add a title to graphs indicating the interval of time they represent.
* Pass --mindwidth=2 to flamegraph.pl to keep the generated SVGs small.
* Typo fix for xenon-log
Change-Id: Ic05bf9876d774218df38736e5785d844059c1a4a
---
M modules/xenon/files/xenon-generate-svgs
M modules/xenon/files/xenon-log
2 files changed, 5 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/67/179967/1
diff --git a/modules/xenon/files/xenon-generate-svgs
b/modules/xenon/files/xenon-generate-svgs
index d667522..57a6d4f 100755
--- a/modules/xenon/files/xenon-generate-svgs
+++ b/modules/xenon/files/xenon-generate-svgs
@@ -3,6 +3,9 @@
shopt -s globstar nullglob
for log in /srv/xenon/**/*.log; do
svg="${log//log/svg}"
+ period="$(basename "$(dirname "$log")")"
+ time="$(basename "$log" ".log")"
+ title="MediaWiki - ${period} - ${time/_/ }"
mkdir -m0755 -p "$(dirname $svg)"
- [ ! -f "$svg" -o "$svg" -ot "$log" ] && /usr/local/bin/flamegraph.pl
--minwidth=1 "$log" > "$svg"
+ [ ! -f "$svg" -o "$svg" -ot "$log" ] && /usr/local/bin/flamegraph.pl
--minwidth=2 --title="$title" "$log" > "$svg"
done
diff --git a/modules/xenon/files/xenon-log b/modules/xenon/files/xenon-log
index 20638ae..1e1d05c 100755
--- a/modules/xenon/files/xenon-log
+++ b/modules/xenon/files/xenon-log
@@ -30,7 +30,7 @@
parser.add_argument('config', nargs='?', default='/etc/xenon-log.yaml')
args = parser.parse_args()
-with args.config as f:
+with open(args.config) as f:
config = yaml.load(f)
--
To view, visit https://gerrit.wikimedia.org/r/179967
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic05bf9876d774218df38736e5785d844059c1a4a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits