[Swift-commit] r7508 - in provenancedb: . tags

lgadelha at ci.uchicago.edu lgadelha at ci.uchicago.edu
Fri Jan 24 15:53:50 CST 2014


Author: lgadelha
Date: 2014-01-24 15:53:49 -0600 (Fri, 24 Jan 2014)
New Revision: 7508

Modified:
   provenancedb/prov-init.sql
   provenancedb/prov-to-sql.sh
   provenancedb/tags/tags-init.sql
Log:
Fix runtime stats extraction script.


Modified: provenancedb/prov-init.sql
===================================================================
--- provenancedb/prov-init.sql	2014-01-24 16:34:22 UTC (rev 7507)
+++ provenancedb/prov-init.sql	2014-01-24 21:53:49 UTC (rev 7508)
@@ -161,21 +161,6 @@
      exit_status		numeric
 );
 
---     maxrss            numeric,
---     walltime          numeric,
---     systime           numeric,
---     usertime          numeric,
---     cpu               numeric,
---     fsin              numeric,
---     fsout             numeric,
---     timesswpd         numeric,
---     socketrecv        numeric,
---     socketsent        numeric,
---     majpfaults        numeric,
---     minpfaults        numeric,
---     ctxswinv          numeric,
---     ctxswvol          numeric,
-
 create view application_execution as
   select id, app_fun_call_id as function_call_id, to_timestamp(start_time) as start_time, duration, final_state, site
   from   app_exec;

Modified: provenancedb/prov-to-sql.sh
===================================================================
--- provenancedb/prov-to-sql.sh	2014-01-24 16:34:22 UTC (rev 7507)
+++ provenancedb/prov-to-sql.sh	2014-01-24 21:53:49 UTC (rev 7508)
@@ -138,8 +138,8 @@
 	real_secs=$(echo $runtime | awk -F "," '{print $1}' | awk -F ":" '{print $2}')
 	kernel_secs=$(echo $runtime | awk -F "," '{print $2}' | awk -F ":" '{print $2}')
 	user_secs=$(echo $runtime | awk -F "," '{print $3}' | awk -F ":" '{print $2}')
-	percent_cpu=$(echo $runtime | awk -F "," '{print $3}' | awk -F ":" '{print $2}')
-	max_rss=$(echo $runtime | awk -F "," '{print $3}' | awk -F ":" '{print $2}')
+	percent_cpu=$(echo $runtime | awk -F "," '{print $4}' | awk -F ":" '{print $2}' | awk -F "%" '{print $1}')
+	max_rss=$(echo $runtime | awk -F "," '{print $5}' | awk -F ":" '{print $2}')
 	avg_rss=$(echo $runtime | awk -F "," '{print $6}' | awk -F ":" '{print $2}')
 	avg_tot_vm=$(echo $runtime | awk -F "," '{print $7}' | awk -F ":" '{print $2}')
 	avg_priv_data=$(echo $runtime | awk -F "," '{print $8}' | awk -F ":" '{print $2}')
@@ -149,14 +149,14 @@
 	major_pgfaults=$(echo $runtime | awk -F "," '{print $12}' | awk -F ":" '{print $2}')
 	minor_pgfaults=$(echo $runtime | awk -F "," '{print $13}' | awk -F ":" '{print $2}')
 	swaps=$(echo $runtime | awk -F "," '{print $14}' | awk -F ":" '{print $2}')
-	invol_context_switches=$(echo $runtime | awk -F "," '{print $2}' | awk -F ":" '{print $2}')
-	vol_waits=$(echo $runtime | awk -F "," '{print $15}' | awk -F ":" '{print $2}')
-	fs_reads=$(echo $runtime | awk -F "," '{print $16}' | awk -F ":" '{print $2}')
-	fs_writes=$(echo $runtime | awk -F "," '{print $17}' | awk -F ":" '{print $2}')
-	sock_recv=$(echo $runtime | awk -F "," '{print $18}' | awk -F ":" '{print $2}')
-	sock_send=$(echo $runtime | awk -F "," '{print $19}' | awk -F ":" '{print $2}')
-	signals=$(echo $runtime | awk -F "," '{print $20}' | awk -F ":" '{print $2}')
-	exit_status=$(echo $runtime | awk -F "," '{print $21}' | awk -F ":" '{print $2}')
+	invol_context_switches=$(echo $runtime | awk -F "," '{print $15}' | awk -F ":" '{print $2}')
+	vol_waits=$(echo $runtime | awk -F "," '{print $16}' | awk -F ":" '{print $2}')
+	fs_reads=$(echo $runtime | awk -F "," '{print $17}' | awk -F ":" '{print $2}')
+	fs_writes=$(echo $runtime | awk -F "," '{print $18}' | awk -F ":" '{print $2}')
+	sock_recv=$(echo $runtime | awk -F "," '{print $19}' | awk -F ":" '{print $2}')
+	sock_send=$(echo $runtime | awk -F "," '{print $20}' | awk -F ":" '{print $2}')
+	signals=$(echo $runtime | awk -F "," '{print $21}' | awk -F ":" '{print $2}')
+	exit_status=$(echo $runtime | awk -F "," '{print $22}' | awk -F ":" '{print $2}')
 	
 	echo "UPDATE app_exec SET real_secs='$real_secs', kernel_secs='$kernel_secs', user_secs='$user_secs', percent_cpu='$percent_cpu', max_rss='$max_rss', avg_rss='$avg_rss', avg_tot_vm='$avg_tot_vm', avg_priv_data='$avg_priv_data', avg_priv_stack='$avg_priv_stack', avg_shared_text='$avg_shared_text', page_size='$page_size', major_pgfaults='$major_pgfaults', minor_pgfaults='$minor_pgfaults', swaps='$swaps', invol_context_switches='$invol_context_switches', vol_waits='$vol_waits', fs_reads='$fs_reads', fs_writes='$fs_writes', sock_recv='$sock_recv', sock_send='$sock_send', signals='$signals', exit_status='$exit_status' WHERE id='$execute2_id';" >> /tmp/$RUNID.sql
 	#echo "INSERT INTO rt_info (app_exec_id, timestamp, cpu_usage, max_phys_mem, max_virt_mem, io_read, io_write) VALUES ('$execute2_id', $timestamp, $cpu_usage, $max_phys_mem, $max_virtual_mem, $io_read_bytes, $io_write_bytes);"  >> /tmp/$RUNID.sql

Modified: provenancedb/tags/tags-init.sql
===================================================================
--- provenancedb/tags/tags-init.sql	2014-01-24 16:34:22 UTC (rev 7507)
+++ provenancedb/tags/tags-init.sql	2014-01-24 21:53:49 UTC (rev 7508)
@@ -30,3 +30,7 @@
        -- primary key (dataset_id, name)
 );
 
+create view annotation as
+       select dataset_id, name, NULL as numeric_value, value as text_value from annot_dataset_text
+       union all
+       select dataset_id, name, value as numeric_value, NULL as text_value from annot_dataset_num;




More information about the Swift-commit mailing list