[Swift-commit] r2683 - / trunk/bin trunk/libexec trunk/tests

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Sun Mar 15 11:56:02 CDT 2009


Author: benc
Date: 2009-03-15 11:56:01 -0500 (Sun, 15 Mar 2009)
New Revision: 2683

Added:
   trunk/bin/swift-log-to-cedps
   trunk/bin/swift-plot-log
   trunk/libexec/log-processing/
   trunk/tests/log-processing/
Removed:
   log-processing/
Log:
merge log-processing into main swift release

Copied: trunk/bin/swift-log-to-cedps (from rev 2682, log-processing/bin/swift-log-to-cedps)
===================================================================
--- trunk/bin/swift-log-to-cedps	                        (rev 0)
+++ trunk/bin/swift-log-to-cedps	2009-03-15 16:56:01 UTC (rev 2683)
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+ORIGDIR=$(pwd)
+WORKINGDIR=$(mktemp -d /tmp/swift-plot-log-XXXXXXXXXXXXXXXX)
+
+
+# $1 should be the pathname of the log file to plot
+
+LOG_CODE_HOME="`dirname $0`/../libexec/log-processing/"
+export SWIFT_PLOT_HOME=$LOG_CODE_HOME
+
+export PATH=${LOG_CODE_HOME}:${PATH}
+
+FC="${1:0:1}"
+
+if [ "$FC" = "/" ]; then # absolute path
+  LOG_FILE_PATH=$1
+else
+  LOG_FILE_PATH="`pwd`/$1"
+fi
+
+LOG_DIRECTORY=`dirname $LOG_FILE_PATH`
+
+LOG_FILE_BASE=`basename $LOG_FILE_PATH .log`
+
+echo Log file path is $LOG_FILE_PATH
+echo Log is in directory $LOG_DIRECTORY
+echo Log basename is $LOG_FILE_BASE
+
+cd $WORKINGDIR
+echo Now in directory $(pwd)
+
+MAKEENV="-f ${LOG_CODE_HOME}/makefile -I ${LOG_CODE_HOME}"
+MAKETARGETS=""
+
+INFODIR=${LOG_DIRECTORY}/${LOG_FILE_BASE}.d
+
+if [ -d $INFODIR ]; then
+ MAKEENV="$MAKEENV IDIR=${LOG_DIRECTORY}/${LOG_FILE_BASE}.d/"
+ MAKETARGETS="webpage.info"
+fi
+
+make $MAKEENV SDL=${ORIGDIR}/report-${LOG_FILE_BASE} LOG=$LOG_FILE_PATH clean execute.cedps execute2.cedps karatasks.cedps
+
+cp -v *.cedps $ORIGDIR
+
+# webpage.kara webpage.weights karatasks.JOB_SUBMISSION.Queue.transitions karatasks.JOB_SUBMISSION.Queue.event karatasks.JOB_SUBMISSION.eip  $MAKETARGETS webpage distribute
+
+# mv report-$LOG_FILE_BASE $LOG_DIRECTORY/
+
+# rm -r $WORKINGDIR
+echo not removing $WORKINGDIR

Copied: trunk/bin/swift-plot-log (from rev 2682, log-processing/bin/swift-plot-log)
===================================================================
--- trunk/bin/swift-plot-log	                        (rev 0)
+++ trunk/bin/swift-plot-log	2009-03-15 16:56:01 UTC (rev 2683)
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+ORIGDIR=$(pwd)
+WORKINGDIR=$(mktemp -d /tmp/swift-plot-log-XXXXXXXXXXXXXXXX)
+
+
+# $1 should be the pathname of the log file to plot
+
+LOG_CODE_HOME="`dirname $0`/../libexec/log-processing/"
+export SWIFT_PLOT_HOME=$LOG_CODE_HOME
+
+export PATH=${LOG_CODE_HOME}:${PATH}
+
+FC="${1:0:1}"
+
+if [ "$FC" = "/" ]; then # absolute path
+  LOG_FILE_PATH=$1
+else
+  LOG_FILE_PATH="`pwd`/$1"
+fi
+
+LOG_DIRECTORY=`dirname $LOG_FILE_PATH`
+
+LOG_FILE_BASE=`basename $LOG_FILE_PATH .log`
+
+echo Log file path is $LOG_FILE_PATH
+echo Log is in directory $LOG_DIRECTORY
+echo Log basename is $LOG_FILE_BASE
+
+cd $WORKINGDIR
+echo Now in directory $(pwd)
+
+MAKEENV="-f ${LOG_CODE_HOME}/makefile -I ${LOG_CODE_HOME}"
+MAKETARGETS=""
+
+INFODIR=${LOG_DIRECTORY}/${LOG_FILE_BASE}.d
+
+if [ -d $INFODIR ]; then
+ MAKEENV="$MAKEENV IDIR=${LOG_DIRECTORY}/${LOG_FILE_BASE}.d/"
+ MAKETARGETS="webpage.info"
+fi
+
+if [ "X$2" = "X" ]; then
+make $MAKEENV SDL=${ORIGDIR}/report-${LOG_FILE_BASE} LOG=$LOG_FILE_PATH clean webpage.kara webpage.weights karatasks.JOB_SUBMISSION.Queue.transitions karatasks.JOB_SUBMISSION.Queue.event karatasks.JOB_SUBMISSION.eip  $MAKETARGETS webpage distribute
+else
+make $MAKEENV SDL=${ORIGDIR}/report-${LOG_FILE_BASE} LOG=$LOG_FILE_PATH clean $2
+cp $2 $ORIGDIR/
+fi
+
+# mv report-$LOG_FILE_BASE $LOG_DIRECTORY/
+
+rm -r $WORKINGDIR

Copied: trunk/libexec/log-processing (from rev 2682, log-processing/libexec/log-processing)

Copied: trunk/tests/log-processing (from rev 2682, log-processing/tests/log-processing)




More information about the Swift-commit mailing list