updates to handle only reporting on a specific SVN revision. Updated the R script to show the domain name of the runner, now that S3 logging is working

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@5157 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
depristo 2011-02-01 12:02:12 +00:00
parent e5e65ecfbe
commit 393df46055
2 changed files with 22 additions and 3 deletions

View File

@ -1,3 +1,4 @@
require("plotrix")
args = commandArgs(TRUE);
onCMDLine = ! is.na(args[1])
@ -10,6 +11,9 @@ if ( onCMDLine ) {
d$end.time = as.Date(d$end.time)
} # only read into d if its' available, otherwise assume the data is already loaded
# The unknown records are from the Broad
d$domain.name[d$domain.name == "unknown"] = "broadinstitute.org"
noRecords <- function(name) {
print(paste("No records", name))
frame()
@ -127,7 +131,6 @@ generateOneReport <- function(d, header, includeByWeek = T) {
reportConditionalCountingPlot(d$user.name, d$walker.name, head("Walker invocations by user"))
reportCountingPlot(d$svn.version, head("SVN version"))
reportConditionalCountingPlot(d$svn.version, d$user.name, head("SVN by user"))
# cuts by time
if ( includeByWeek ) {
@ -170,6 +173,7 @@ generateOneReport <- function(d, header, includeByWeek = T) {
reportHist(log10(d$run.time / min), head("Run time (log10[min])"))
reportCountingPlot(d$user.name, head("user"))
reportCountingPlot(d$domain.name, head("Domain name"))
#reportCountingPlot(d$host.name, head("host"))
reportCountingPlot(d$java, head("Java version"))
@ -177,7 +181,7 @@ generateOneReport <- function(d, header, includeByWeek = T) {
#reportCountingPlot(d$working.directory, head("Working directory"))
}
RUNME = T
RUNME = F
if ( RUNME ) {
lastWeek = levels(cut(d$end.time, "weeks"))[-1]
generateOneReport(d, "Overall")

View File

@ -32,6 +32,10 @@ def main():
action='store_true', default=False,
help="if provided, only records not coming from a dev version of GATK will be included")
parser.add_option("", "--rev", dest="rev",
type="string", default=None,
help="if provided, only reports generated by this version of the GATK will be included")
parser.add_option("-E", "", dest="exception_selection",
type='choice', choices=['all', 'user', 'sting'], default='all',
help="if provided, will only emit records matching of the provided class [default %default]")
@ -142,6 +146,14 @@ class RecordDecoder:
def formatExceptionUser(elt):
return '%s' % parseException(elt)[2]
def formatDomainName(elt):
if elt != None:
parts = elt.text.split(".")
if len(parts) >= 2:
return '.'.join(parts[-2:])
else:
return 'unknown'
def add(names, func):
for name in names:
@ -153,7 +165,8 @@ class RecordDecoder:
add(["id", "walker-name", "svn-version", "phone-home-type"], id)
add(["start-time", "end-time"], toString)
add(["run-time", "java-tmp-directory", "working-directory", "user-name", "host-name"], id)
add(["run-time", "java-tmp-directory", "working-directory", "user-name"], id)
addComplex("host-name", ["host-name", "domain-name"], [id, formatDomainName])
add(["java", "machine"], toString)
add(["max-memory", "total-memory", "iterations", "reads"], id)
addComplex("exception", ["exception-msg", "exception-at", "exception-at-brief", "is-user-exception"], [formatExceptionMsg, formatExceptionAt, formatExceptionAtBrief, formatExceptionUser])
@ -443,6 +456,8 @@ def passesFilters(elt):
if OPTIONS.noDev and eltTagEquals(elt.find('argument-collection'),'phone-home-type','DEV'):
#print 'skipping', elt
return False
if OPTIONS.rev != None and not eltTagEquals(elt, 'svn-version', OPTIONS.rev):
return False
if OPTIONS.maxDays != None:
now = datetime.datetime.today()
now = datetime.datetime(now.year, now.month, now.day)