[Sumover-dev] [svn commit] r4736 - in vic/branches/cc/cc: tools

sumover-dev at cs.ucl.ac.uk sumover-dev at cs.ucl.ac.uk
Mon Mar 29 00:48:25 BST 2010


Author: soohyunc
Date: Mon Mar 29 00:48:25 2010
New Revision: 4736

Modified:
   vic/branches/cc/cc/o.sh
   vic/branches/cc/cc/tools/asv.cc

Log:
modifed processing trace file 



Modified: vic/branches/cc/cc/o.sh
==============================================================================
--- vic/branches/cc/cc/o.sh	(original)
+++ vic/branches/cc/cc/o.sh	Mon Mar 29 00:48:25 2010
@@ -1,9 +1,11 @@
 #!/bin/sh
 
+SCALE=100
+
 # packet seqno trace in time
 grep seqno trace.s | grep -v pid | awk '{if($1=="now:" && $3=="seqno:") print}' | awk '{print $2" "$4}' > seqno.tr
-cc/tools/asv seqno seqno.tr
-rm seqno.tr
+cc/tools/asv seqno seqno.tr $SCALE
+#rm seqno.tr
 
 # start encoding
 grep h261_encode_start trace.s | grep -v pid | awk '{print $3" "100}' > encs.xg
@@ -34,7 +36,7 @@
 
 # dropped packet seqno
 grep drop trace.s | awk '{print $2" "$4}' > drop.tr
-cc/tools/asv drop drop.tr
+cc/tools/asv drop drop.tr $SCALE
 rm drop.tr
 
 # tx queue len

Modified: vic/branches/cc/cc/tools/asv.cc
==============================================================================
--- vic/branches/cc/cc/tools/asv.cc	(original)
+++ vic/branches/cc/cc/tools/asv.cc	Mon Mar 29 00:48:25 2010
@@ -45,12 +45,13 @@
 int main (int argc, char *argv[]) {
 
 	if (argc < 2) {
-		cout << "Usage: ./asv <desired output filename> <input file>" << endl;
-		exit (0);
+	cout << "Usage: ./asv <desired output filename> <input file> <factor>" << endl;
+	exit (0);
 	}
 
 	string option = argv[1]; 
 	ifstream fin (argv[2]);
+	int scale = atoi(argv[3]);
 	ofstream fout;
 
 	// variables
@@ -68,7 +69,7 @@
 		while (getline(fin, items)) {
 			istringstream is(items);
 			is >> time >> seqno;
-			fout << time << "\t" << (seqno%100) << endl;
+			fout << time << "\t" << (seqno%scale) << endl;
 		} // while
 
 		fin.close();



More information about the Sumover-dev mailing list