-
Notifications
You must be signed in to change notification settings - Fork 1
/
mk-interesting-graphs.sh
executable file
·33 lines (31 loc) · 1.41 KB
/
mk-interesting-graphs.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
# This file is part of Checkbox.
#
# Copyright 2012 Canonical Ltd.
# Written by:
# Zygmunt Krynicki <[email protected]>
#
# Checkbox is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Checkbox is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Checkbox. If not, see <http://www.gnu.org/licenses/>.
# Create a few interesting graphs
# set -x # it takes a moment, let's keep users busy
mkdir -p graphs
# Find some jobs from each main category
# The grep / discards stuff that does not have category/name pattern
# The rest just gets the category string
for pattern in $(plainbox --list-jobs | grep '/' | cut -c 4- | cut -d '/' -f 1 | sort | uniq); do
plainbox -r $pattern'*' --dot | dot -Tsvg -o graphs/$pattern.svg
plainbox -r $pattern'*' --dot --dot-resources | dot -Tsvg -o graphs/$pattern-with-resources.svg
done
plainbox --dot | dot -Tsvg -o graphs/everything-at-once.svg
plainbox --dot --dot-resources | dot -Tsvg -o graphs/everything-at-once-with-resources.svg