|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [OSSTEST PATCH 21/60] history reporting (nfc): Rename some module variables, remove "cache"
This makes the code terser and easier to read. No functional change.
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
Osstest/HistoryReport.pm | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/Osstest/HistoryReport.pm b/Osstest/HistoryReport.pm
index a0565b6a..61b1ee8f 100644
--- a/Osstest/HistoryReport.pm
+++ b/Osstest/HistoryReport.pm
@@ -40,7 +40,7 @@ BEGIN {
use POSIX;
-our @cache_row_key_cols;
+our @key_cols;
our %cache;
@@ -51,11 +51,11 @@ our $rows_previous = 0;
our $rows_today = 0;
our $rows_hit = 0;
-sub cache_set_key_cols { @cache_row_key_cols = @_; }
+sub cache_set_key_cols { @key_cols = @_; }
-sub cache_row_key ($) {
+sub key ($) {
my ($jr) = @_;
- return join $; , map { $jr->{$_} } @cache_row_key_cols;
+ return join $; , map { $jr->{$_} } @key_cols;
}
sub cacheable_fn ($$$) {
@@ -107,7 +107,7 @@ sub cache_read_previous ($) {
s{\%([0-9a-f]{2})}{ chr hex $1 }ge;
$ch->{$k} = $_;
}
- $cache{cache_row_key($jr)} = $jr;
+ $cache{key($jr)} = $jr;
}
close H;
}
@@ -116,7 +116,7 @@ sub cache_row_lookup_prep ($) {
my ($jrr) = @_;
$rows_today++;
- my $cacherow = $cache{cache_row_key($$jrr)};
+ my $cacherow = $cache{key($$jrr)};
if ($cacherow) {
$$jrr = $cacherow;
$rows_hit++;
--
2.11.0
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |