[tracker/update-array-perfm-test] Just a performance test



commit e09e2c0bc211b55fe0848bd70fb5eb7ee159e97a
Author: Philip Van Hoof <philip codeminded be>
Date:   Mon Mar 7 14:38:43 2011 +0100

    Just a performance test

 src/tracker-store/tracker-steroids.vala |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)
---
diff --git a/src/tracker-store/tracker-steroids.vala b/src/tracker-store/tracker-steroids.vala
index f41c9ed..c5aa811 100644
--- a/src/tracker-store/tracker-steroids.vala
+++ b/src/tracker-store/tracker-steroids.vala
@@ -182,16 +182,27 @@ public class Tracker.Steroids : Object {
 
 			var builder = new VariantBuilder ((VariantType) "as");
 
+			var queries = new StringBuilder ();
+			
 			for (i = 0; i < query_count; i++) {
 				request.debug ("query: %s", query_array[i]);
+				queries.append (query_array[i]);
+				queries.append_c (' ');
 
+				builder.add ("s", "");
+				builder.add ("s", "");
+			}
+
+			if (true) {
 				try {
-					yield Tracker.Store.sparql_update (query_array[i], Tracker.Store.Priority.HIGH, sender);
-					builder.add ("s", "");
-					builder.add ("s", "");
+					// yield Tracker.Store.sparql_update (query_array[i], Tracker.Store.Priority.HIGH, sender);
+					yield Tracker.Store.sparql_update (queries.str, Tracker.Store.Priority.HIGH, sender);
+//					builder.add ("s", "");
+//					builder.add ("s", "");
 				} catch (Error e1) {
-					builder.add ("s", "org.freedesktop.Tracker1.SparqlError.Internal");
-					builder.add ("s", e1.message);
+//					builder.add ("s", "org.freedesktop.Tracker1.SparqlError.Internal");
+//					builder.add ("s", e1.message);
+					critical ("BLA!");
 				}
 
 			}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]