From b6c4adc8e0d4c149c88ac91801824393a42b1860 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Thu, 20 Oct 2011 20:25:16 -0700 Subject: [PATCH] Fix bucket name truncation in the bucket log, and don't forget to check the delta interval when summarizing. --- docs/changelog/7.x.x.txt | 1 + docs/upgrades/upgrade_7.10.23-7.10.24.pl | 13 +++++++++++++ .../Workflow/Activity/SummarizePassiveAnalytics.pm | 4 +++- t/supporting_collateral/passiveAnalyticsLog | 1 + 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 9c9f96399..81dd6014a 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -4,6 +4,7 @@ - fixed #12201: AssetReport - no selects. - fixed #12269: Login / Loginbox with encryptlogin - fixed #12271: Calendar List View does not always show labels + - fixed Passive Analytics, UI, Progress Bar, server load. 7.10.23 - fixed #12225: Stock asset, multiple instances on a page diff --git a/docs/upgrades/upgrade_7.10.23-7.10.24.pl b/docs/upgrades/upgrade_7.10.23-7.10.24.pl index 28b8c8ca4..f0f3db9c2 100644 --- a/docs/upgrades/upgrade_7.10.23-7.10.24.pl +++ b/docs/upgrades/upgrade_7.10.23-7.10.24.pl @@ -33,6 +33,7 @@ my $session = start(); # this line required # upgrade functions go here addPALastLogTable($session); addForkRedirect($session); +extendBucketName($session); finish($session); # this line required @@ -68,6 +69,18 @@ EOSQL print "DONE!\n" unless $quiet; } +#---------------------------------------------------------------------------- +# Describe what our function does +sub extendBucketName { + my $session = shift; + print "\tExtend the size of the bucket name in the bucketLog table for Passive Analytics... " unless $quiet; + # and here's our code + $session->db->write(<execute([ (@{ $logLine }{qw/userId sessionId timeStamp url/}) ]); if ($lastLine->{timeStamp}) { my $delta = $logLine->{timeStamp} - $lastLine->{timeStamp}; - $deltaLog->execute([ (@{ $lastLine }{qw/userId assetId timeStamp url/}), $delta]); + if ($delta <= $deltaInterval) { + $deltaLog->execute([ (@{ $lastLine }{qw/userId assetId timeStamp url/}), $delta]); + } } if (time() > $endTime) { $expired = 1; diff --git a/t/supporting_collateral/passiveAnalyticsLog b/t/supporting_collateral/passiveAnalyticsLog index fa977a48c..9da0ea61a 100644 --- a/t/supporting_collateral/passiveAnalyticsLog +++ b/t/supporting_collateral/passiveAnalyticsLog @@ -6,3 +6,4 @@ user2 session21 200 /yelnats user2 session21 202 /one/uno user2 session21 205 /whatever user2 session21 210 /something_else +user2 session21 610 /something_else