Merge lp:~lifeless/lp-dev-utils/ppr into lp:lp-dev-utils

Proposed by Robert Collins
Status: Merged
Merged at revision: 127
Proposed branch: lp:~lifeless/lp-dev-utils/ppr
Merge into: lp:lp-dev-utils
Diff against target: 43 lines (+12/-7)
1 file modified
page-performance-report-daily.sh (+12/-7)
To merge this branch: bzr merge lp:~lifeless/lp-dev-utils/ppr
Reviewer Review Type Date Requested Status
Robert Collins (community) Approve
Review via email: mp+123714@code.launchpad.net

Description of the change

Various improvements to running the PPR daily script, which is intended to be cronnable. Eliminates local diff for ISD's deployment.

To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) wrote :

And its all trivial, so self-reviewing.

review: Approve
lp:~lifeless/lp-dev-utils/ppr updated
127. By Robert Collins

Improve the PPR daily shell wrapper to need no edits for deployments.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'page-performance-report-daily.sh'
--- page-performance-report-daily.sh 2012-08-09 04:53:16 +0000
+++ page-performance-report-daily.sh 2012-09-11 10:38:22 +0000
@@ -1,10 +1,15 @@
1#!/bin/sh1#!/bin/bash
22
3#TZ=UTC # trace logs are still BST - blech3#TZ=UTC # trace logs are still BST - blech
44
5CATEGORY=lpnet5# Set CONFIG_FILE, LOGS_ROOTS, LOG_PATTERN, OUTPUT_ROOT in the environment
6LOGS_ROOTS="/srv/launchpad.net-logs/production /srv/launchpad.net-logs/edge"6# before running this script, to customise its behaviour.
7OUTPUT_ROOT=${HOME}/public_html/ppr/lpnet7
8CONFIG_FILE=${CONFIG_FILE:-'page-performance-report.ini'}
9PPR_SWITCHES=${PPR_SWITCHES:-''}
10LOGS_ROOTS=${LOGS_ROOTS:-"/srv/launchpad.net-logs/production /srv/launchpad.net-logs/edge"}
11LOG_PATTERN=${LOG_PATTERN:-'launchpad-trace\*'}
12OUTPUT_ROOT=${OUTPUT_ROOT:-${HOME}/public_html/ppr/lpnet}
8DAY_FMT="+%Y-%m-%d"13DAY_FMT="+%Y-%m-%d"
914
10find_logs() {15find_logs() {
@@ -19,7 +24,7 @@
1924
20 find ${LOGS_ROOTS} \25 find ${LOGS_ROOTS} \
21 -maxdepth 2 -type f -newermt "$from - 1 day" $end_mtime_switch \26 -maxdepth 2 -type f -newermt "$from - 1 day" $end_mtime_switch \
22 -name launchpad-trace\* \27 -name ${LOG_PATTERN} \
23 | sort | xargs -x28 | sort | xargs -x
24}29}
2530
@@ -67,8 +72,8 @@
6772
68 echo Generating report from $from until $until into $dir `date`73 echo Generating report from $from until $until into $dir `date`
6974
70 ./page-performance-report.py -v --top-urls=200 --directory=${dir} \75 ./bin/py page-performance-report.py --top-urls=200 --directory=${dir} \
71 $options $files76 $options ${PPR_SWITCHES} $files
7277
73 # Only do the linking if requested.78 # Only do the linking if requested.
74 if [ "$link" = "link" ]; then79 if [ "$link" = "link" ]; then

Subscribers

People subscribed via source and target branches