[lintian] 01/01: Make some corrections to the gnuplot optimization
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit 3e6c8099fd74275f5f8d4c6e796d30264918f1eb
Author: Niels Thykier <niels@thykier.net>
Date: Wed Jan 15 20:07:42 2014 +0100
Make some corrections to the gnuplot optimization
Signed-off-by: Niels Thykier <niels@thykier.net>
---
debian/changelog | 2 ++
reporting/html_reports | 16 ++++++++--------
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index db8e1ca..9f98b2f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,8 @@ lintian (2.5.22) UNRELEASED; urgency=medium
* reporting/html_reports:
+ [NT] Link to the library API docs from the index page.
(Closes: #639974)
+ + [NT] Optimise the graph generation by only calling
+ gnuplot twice (rather than once plus once per tag).
-- Niels Thykier <niels@thykier.net> Tue, 14 Jan 2014 21:18:15 +0100
diff --git a/reporting/html_reports b/reporting/html_reports
index b0a7734..4e5c78c 100755
--- a/reporting/html_reports
+++ b/reporting/html_reports
@@ -663,12 +663,7 @@ if ($GRAPHS) {
my $gnuplot_fd;
if ($GRAPHS) {
- my $pid = open($gnuplot_fd, '|-');
- if (not $pid) {
- chdir($graph_dir);
- exec('gnuplot', '-')
- or die("exec \"gnuplot -\" failed: $!");
- }
+ open($gnuplot_fd, '>', "$graph_dir/call.gpi");
}
for my $tag (sort keys %tag_statistics) {
@@ -679,14 +674,19 @@ for my $tag (sort keys %tag_statistics) {
."$stats->{'packages'}\n";
close($tag_fd);
if ($GRAPHS) {
- print "Plotting $tag statistics...\n";
print {$gnuplot_fd}
- qq{call "$LINTIAN_ROOT/reporting/graphs/tags.gpi" "$tag"\n};
+ qq{print 'Plotting $tag statistics...'\n};
+ print {$gnuplot_fd}
+ qq{call '$LINTIAN_ROOT/reporting/graphs/tags.gpi' '$tag'\n};
+ print {$gnuplot_fd}
+ qq{reset\n};
}
}
if ($GRAPHS) {
close($gnuplot_fd);
+ chdir_system($graph_dir, ['gnuplot', 'call.gpi']) == 0
+ or die("gnuplot died with $?\n");
unlink($commonf);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: