[Swift-commit] r5634 - provenancedb

lgadelha at ci.uchicago.edu lgadelha at ci.uchicago.edu
Thu Feb 16 10:02:57 CST 2012


Author: lgadelha
Date: 2012-02-16 10:02:57 -0600 (Thu, 16 Feb 2012)
New Revision: 5634

Modified:
   provenancedb/build_script_run_provenance_graph.sh
   provenancedb/swift-prov-import-all-logs
Log:
Minor updates.


Modified: provenancedb/build_script_run_provenance_graph.sh
===================================================================
--- provenancedb/build_script_run_provenance_graph.sh	2012-02-16 15:03:22 UTC (rev 5633)
+++ provenancedb/build_script_run_provenance_graph.sh	2012-02-16 16:02:57 UTC (rev 5634)
@@ -31,17 +31,17 @@
 	functioncalllabel="$functioncall"	
 	variablelabel="$variable"
 	if [ "$variabletype" == "mapped" ]; then
-		variablelabel="variable:mapped:"$($SQLCMD --tuples-only -c "select filename from variable where id='$variable'" | awk '{print $1}')
+		variablelabel="mapped:"$($SQLCMD --tuples-only -c "select filename from variable where id='$variable'" | awk '{print $1}')
 	fi
 	if [ "$variabletype" == "primitive" ]; then
-		variablelabel="variable:primitive:"$($SQLCMD --tuples-only -c "select value from variable where id='$variable'" | awk '{print $1}')
+		variablelabel="primitive:"$($SQLCMD --tuples-only -c "select value from variable where id='$variable'" | awk '{print $1}')
 	fi
 	if [ "$variabletype" == "composite" ]; then
-		variablelabel="variable:composite"
+		variablelabel="composite"
 	fi
 		
 	
-	functioncalllabel="function_call:"$($SQLCMD --tuples-only -c "select name from function_call where id='$functioncall'" | awk '{print $1}')
+	functioncalllabel=$($SQLCMD --tuples-only -c "select name from function_call where id='$functioncall'" | awk '{print $1}')
 	parameter=$($SQLCMD --tuples-only -c "select parameter from ds_use where function_call_id='$functioncall' and variable_id='$variable';" | awk '{print $1}')
 
 	echo "\"$variable\" [ label=\"$variablelabel\", style=filled, fillcolor=lightcyan ];" >> /tmp/$1.header.dot

Modified: provenancedb/swift-prov-import-all-logs
===================================================================
--- provenancedb/swift-prov-import-all-logs	2012-02-16 15:03:22 UTC (rev 5633)
+++ provenancedb/swift-prov-import-all-logs	2012-02-16 16:02:57 UTC (rev 5634)
@@ -34,6 +34,7 @@
 while read start version filename; do
     
     export IDIR=$(echo $filename | sed 's/\.log$/.d/')
+    COG_VERSION=$(grep -m 1 -E 'Swift .* swift-r[0-9]*' $filename | sed 's/.*Swift .* cog-r\([0-9]*\).*/\1/')
     echo IDIR=$IDIR
     if [ $version -ge 1538 ]; then
 	echo -n "Log: $filename ... "
@@ -57,7 +58,7 @@
 		export WF="${RUNID}"
 		
 		echo "BEGIN TRANSACTION;" > /tmp/$WF.sql
-		echo "INSERT INTO run (id, log_filename, swift_version, cog_version, final_state) VALUES ('$WF','$filename','$version', '', '$wfstatus');" >> /tmp/$WF.sql
+		echo "INSERT INTO run (id, log_filename, swift_version, cog_version, final_state) VALUES ('$WF','$filename','$version', '$COG_VERSION', '$wfstatus');" >> /tmp/$WF.sql
 		
 		echo version $version in log file $filename
 		echo ============= will import =============




More information about the Swift-commit mailing list