------------------------------------------------------------
revno: 355
committer: Seif Lotfy <s...@lotfy.com>
branch nick: zeitgeist
timestamp: Thu 2011-12-22 23:57:10 +0100
message:
  added overall time
modified:
  tools/development/README
  tools/development/mem.json
  tools/development/query_timings.py
  tools/development/trunk.json


--
lp:zeitgeist
https://code.launchpad.net/~zeitgeist/zeitgeist/bluebird

Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.
To unsubscribe from this branch go to 
https://code.launchpad.net/~zeitgeist/zeitgeist/bluebird/+edit-subscription
=== modified file 'tools/development/README'
--- tools/development/README	2011-12-22 22:18:46 +0000
+++ tools/development/README	2011-12-22 22:57:10 +0000
@@ -11,7 +11,7 @@
 #  ./query_timings.py -m -o output.json
 # To plot the data use the '--plot' argument, multible '--plot' arguments
 # When plotting one needs to choose between several types of plots such using 
-# --type with arguments marsh_time, get_events_time, find_ids_time, find_events
+# --type with arguments marsh_time, get_events_time, find_ids_time, find_events, overall)
 #
 # will define multible series.
 #  ./query_timings.py --plot output.json --plot output1.json -o plot.svg

=== modified file 'tools/development/mem.json'
--- tools/development/mem.json	2011-12-22 22:18:46 +0000
+++ tools/development/mem.json	2011-12-22 22:57:10 +0000
@@ -1,59 +1,68 @@
 {
     "TimeRange.always(), [], StorageState.Any, 100, ResultType.MostPopularActor": {
-        "timing": 0.18629177999999996, 
-        "get_events_time": 0.00381472, 
-        "find_ids_time": 0.18247706000000008, 
-        "marsh_time": 0.00280074
+        "find_events": 0.1846622200000001, 
+        "get_events_time": 0.0038136999999999997, 
+        "find_ids_time": 0.20167999267578124, 
+        "overall": 0.18847592, 
+        "marsh_time": 0.00286044
     }, 
     "__metadata__": {
         "name": "lp:zeitgeist-memory"
     }, 
     "TimeRange.always(), [], StorageState.Any, 100, ResultType.MostRecentMimeType": {
-        "timing": 0.18420970000000003, 
-        "get_events_time": 0.003818539999999999, 
-        "find_ids_time": 0.1803911600000001, 
-        "marsh_time": 0.0028456799999999997
+        "find_events": 0.18125415999999997, 
+        "get_events_time": 0.0037675800000000004, 
+        "find_ids_time": 0.19801628112792968, 
+        "overall": 0.18502174, 
+        "marsh_time": 0.0028360200000000003
     }, 
     "TimeRange.always(), [], StorageState.Any, 100, ResultType.MostRecentEvents": {
-        "timing": 0.22361966, 
-        "get_events_time": 0.003529100000000001, 
-        "find_ids_time": 0.22009056000000005, 
-        "marsh_time": 0.002739
+        "find_events": 0.22450478000000004, 
+        "get_events_time": 0.003636660000000001, 
+        "find_ids_time": 0.24092146396636963, 
+        "overall": 0.22814144, 
+        "marsh_time": 0.0028534200000000006
     }, 
     "TimeRange.always(), [], StorageState.Any, 100, ResultType.MostPopularMimeType": {
-        "timing": 0.19166887999999993, 
-        "get_events_time": 0.00392188, 
-        "find_ids_time": 0.18774699999999997, 
-        "marsh_time": 0.00288516
+        "find_events": 0.18577652, 
+        "get_events_time": 0.0038717200000000004, 
+        "find_ids_time": 0.20267923831939696, 
+        "overall": 0.18964824000000002, 
+        "marsh_time": 0.00290134
     }, 
     "TimeRange.always(), [], StorageState.Any, 100, ResultType.MostPopularSubjects": {
-        "timing": 0.2527026000000001, 
-        "get_events_time": 0.003905459999999999, 
-        "find_ids_time": 0.24879714000000003, 
-        "marsh_time": 0.0028660400000000003
+        "find_events": 0.31522891999999997, 
+        "get_events_time": 0.004730179999999998, 
+        "find_ids_time": 0.33615870475769044, 
+        "overall": 0.31995909999999994, 
+        "marsh_time": 0.0036437199999999996
     }, 
     "TimeRange.always(), [], StorageState.Any, 100, ResultType.MostPopularSubjectInterpretation": {
-        "timing": 0.1668351999999999, 
-        "get_events_time": 0.00106968, 
-        "find_ids_time": 0.16576552000000003, 
-        "marsh_time": 0.0006100599999999999
+        "find_events": 0.19031057999999998, 
+        "get_events_time": 0.0011861600000000001, 
+        "find_ids_time": 0.1958630323410034, 
+        "overall": 0.19149674, 
+        "marsh_time": 0.0007032400000000003
     }, 
     "TimeRange.always(), [], StorageState.Any, 100, ResultType.MostRecentSubjects": {
-        "timing": 0.24110648, 
-        "get_events_time": 0.003594119999999999, 
-        "find_ids_time": 0.23751235999999998, 
-        "marsh_time": 0.0027681200000000006
+        "find_events": 0.30441516, 
+        "get_events_time": 0.004497760000000001, 
+        "find_ids_time": 0.3248697566986084, 
+        "overall": 0.30891292, 
+        "marsh_time": 0.0035954999999999993
     }, 
     "TimeRange.always(), [], StorageState.Any, 100, ResultType.MostRecentActor": {
-        "timing": 0.18171406, 
-        "get_events_time": 0.003741119999999999, 
-        "find_ids_time": 0.17797293999999994, 
-        "marsh_time": 0.0027444399999999995
+        "find_events": 0.17844293999999997, 
+        "get_events_time": 0.0037379200000000005, 
+        "find_ids_time": 0.1951742935180664, 
+        "overall": 0.18218086, 
+        "marsh_time": 0.00282154
     }, 
     "TimeRange.always(), [], StorageState.Any, 100, ResultType.MostRecentSubjectInterpretation": {
-        "timing": 0.16167568000000002, 
-        "get_events_time": 0.00108758, 
-        "find_ids_time": 0.16058809999999998, 
-        "marsh_time": 0.0006222800000000002
+        "find_events": 0.22029188000000008, 
+        "get_events_time": 0.0013980600000000002, 
+        "find_ids_time": 0.2268238639831543, 
+        "overall": 0.22168994, 
+        "marsh_time": 0.0008562600000000004
     }
 }
\ No newline at end of file

=== modified file 'tools/development/query_timings.py'
--- tools/development/query_timings.py	2011-12-22 22:18:46 +0000
+++ tools/development/query_timings.py	2011-12-22 22:57:10 +0000
@@ -22,19 +22,19 @@
 #
 # To run the benchmarks on a certain branch of zeitgeist make sure this
 # branch is in PYTHONPATH.
-# To benchmark and output timing to 'output.json' run
-#  ./query_timings.py -o output.json
+# To benchmark and output overall to 'output.json' run
+#  ./query_overalls.py -o output.json
 # If you already have data in the output file and want to merge both
 # data sets (build avg.) run
-#  ./query_timings.py -m -o output.json
+#  ./query_overalls.py -m -o output.json
 # To plot the data use the '--plot' argument, multible '--plot' arguments
 # will define multible series.
-#  ./query_timings.py --plot output.json --plot output1.json -o plot.svg
+#  ./query_overalls.py --plot output.json --plot output1.json -o plot.svg
 # In short, a run always looks like:
-#  PYTHONPATH=../trunk tools/development/query_timings.py --name "lp:zeitgeist" -o trunk.json \
+#  PYTHONPATH=../trunk tools/development/query_overalls.py --name "lp:zeitgeist" -o trunk.json \
 #       --queries tools/development/query_sets/timerange_always.txt
-#  PYTHONPATH=. tools/development/query_timings.py --name "lp:some-branch" -o somebranch.json
-#  PYTHONPATH=. tools/development/query_timings.py --plot somebranch.json --plot trunk.json -o benchmark.svg
+#  PYTHONPATH=. tools/development/query_overalls.py --name "lp:some-branch" -o somebranch.json
+#  PYTHONPATH=. tools/development/query_overalls.py --plot somebranch.json --plot trunk.json -o benchmark.svg
 
 import os
 import random
@@ -153,11 +153,11 @@
 if __name__ == "__main__":
     options = get_cmdline()
     if options.plot_files:
-        if options.type in ("marsh_time", "get_events_time", "find_ids_time", "find_events"):
+        if options.type in ("marsh_time", "get_events_time", "find_ids_time", "find_events", "overall"):
             assert options.output
             plot(options.output, options.type, *options.plot_files)
         else:
-            print "please specify plot type (marsh_time, get_events_time, find_ids_time, find_events)"
+            print "please specify plot type (marsh_time, get_events_time, find_ids_time, find_events, overall)"
     else:
         engine = get_reference_engine()
         result = {}
@@ -178,7 +178,9 @@
             logging.getLogger("").addHandler(handler)
             results = {}
             for i in xrange (50):
+                t1 = time.time()
                 temp = engine.find_events(*args)
+                temp["overall"] = time.time() - t1
                 if len(results.keys()) == 0:
                     for key in results.keys():
                         temp[key] = temp[key]
@@ -197,7 +199,8 @@
             
             events = results["events"]
             run_time = results["find_events"]
-            find_ids_time = results["find_event_ids"]
+            find_ids_time = results["overall"]
+            find_events_time = results["find_event_ids"]
             get_events_time = results["get_events"]
             marsh_time = results["marsh_events"]
             
@@ -206,21 +209,23 @@
             if query in existing_data and options.merge:
                 print "=================================="
                 counter = existing_data[query].get("counter", 1)
-                old_time = existing_data[query]["timing"]
+                old_time = existing_data[query]["overall"]
                 run_time = (old_time * counter + run_time)/(counter + 1)
                 
                 result[query] = {
-                    "timing": run_time,
+                    "overall": run_time,
                     "counter": counter + 1,
                     "find_ids_time": find_ids_time,
                     "get_events_time": get_events_time,
+                    "find_events": find_events_time,
                     "marsh_time": marsh_time,
                 }
             else:
                 result[query] = {
-                    "timing": run_time,
+                    "overall": run_time,
                     "find_ids_time": find_ids_time,
                     "get_events_time": get_events_time,
+                    "find_events": find_events_time,
                     "marsh_time": marsh_time,
                 }
         if options.output:

=== modified file 'tools/development/trunk.json'
--- tools/development/trunk.json	2011-12-22 22:18:46 +0000
+++ tools/development/trunk.json	2011-12-22 22:57:10 +0000
@@ -1,59 +1,68 @@
 {
     "TimeRange.always(), [], StorageState.Any, 100, ResultType.MostPopularActor": {
-        "timing": 0.18741760000000007, 
-        "get_events_time": 0.003746419999999999, 
-        "find_ids_time": 0.18367118, 
-        "marsh_time": 0.0020144799999999995
+        "find_events": 0.18468548, 
+        "get_events_time": 0.0036406999999999993, 
+        "find_ids_time": 0.1999027967453003, 
+        "overall": 0.19031572, 
+        "marsh_time": 0.00198954
     }, 
     "__metadata__": {
         "name": "lp:zeitgeist"
     }, 
     "TimeRange.always(), [], StorageState.Any, 100, ResultType.MostRecentMimeType": {
-        "timing": 0.18626736000000008, 
-        "get_events_time": 0.0037554600000000004, 
-        "find_ids_time": 0.18251189999999998, 
-        "marsh_time": 0.0020258400000000005
+        "find_events": 0.24061812000000007, 
+        "get_events_time": 0.004851439999999999, 
+        "find_ids_time": 0.26048434734344483, 
+        "overall": 0.24815498000000008, 
+        "marsh_time": 0.00268542
     }, 
     "TimeRange.always(), [], StorageState.Any, 100, ResultType.MostRecentEvents": {
-        "timing": 0.22007287999999994, 
-        "get_events_time": 0.0034922000000000004, 
-        "find_ids_time": 0.21658067999999994, 
-        "marsh_time": 0.00198292
+        "find_events": 0.22520402, 
+        "get_events_time": 0.0035227599999999998, 
+        "find_ids_time": 0.24481987476348877, 
+        "overall": 0.23074491999999996, 
+        "marsh_time": 0.00201814
     }, 
     "TimeRange.always(), [], StorageState.Any, 100, ResultType.MostPopularMimeType": {
-        "timing": 0.18961217999999996, 
-        "get_events_time": 0.003844, 
-        "find_ids_time": 0.18576818, 
-        "marsh_time": 0.00207656
+        "find_events": 0.18227677999999994, 
+        "get_events_time": 0.00370286, 
+        "find_ids_time": 0.19794647693634032, 
+        "overall": 0.18799147999999996, 
+        "marsh_time": 0.00201184
     }, 
     "TimeRange.always(), [], StorageState.Any, 100, ResultType.MostPopularSubjects": {
-        "timing": 0.24947942000000004, 
-        "get_events_time": 0.0037705800000000012, 
-        "find_ids_time": 0.24570883999999993, 
-        "marsh_time": 0.00201412
+        "find_events": 0.25038046, 
+        "get_events_time": 0.00368694, 
+        "find_ids_time": 0.2657345771789551, 
+        "overall": 0.25607208000000004, 
+        "marsh_time": 0.00200468
     }, 
     "TimeRange.always(), [], StorageState.Any, 100, ResultType.MostPopularSubjectInterpretation": {
-        "timing": 0.16550616, 
-        "get_events_time": 0.0010536599999999997, 
-        "find_ids_time": 0.16445249999999997, 
-        "marsh_time": 0.00046594
+        "find_events": 0.1669545, 
+        "get_events_time": 0.0010883600000000002, 
+        "find_ids_time": 0.17183988571166992, 
+        "overall": 0.16851842000000006, 
+        "marsh_time": 0.00047555999999999987
     }, 
     "TimeRange.always(), [], StorageState.Any, 100, ResultType.MostRecentSubjects": {
-        "timing": 0.23891839999999998, 
-        "get_events_time": 0.003531039999999999, 
-        "find_ids_time": 0.23538735999999993, 
-        "marsh_time": 0.0019742199999999996
+        "find_events": 0.2365201399999999, 
+        "get_events_time": 0.003541620000000001, 
+        "find_ids_time": 0.25139119625091555, 
+        "overall": 0.24203851999999998, 
+        "marsh_time": 0.0019767599999999997
     }, 
     "TimeRange.always(), [], StorageState.Any, 100, ResultType.MostRecentActor": {
-        "timing": 0.17982862, 
-        "get_events_time": 0.0036389000000000005, 
-        "find_ids_time": 0.17618972, 
-        "marsh_time": 0.00198492
+        "find_events": 0.18014862000000004, 
+        "get_events_time": 0.00369312, 
+        "find_ids_time": 0.19580111026763916, 
+        "overall": 0.18583920000000007, 
+        "marsh_time": 0.0019974599999999995
     }, 
     "TimeRange.always(), [], StorageState.Any, 100, ResultType.MostRecentSubjectInterpretation": {
-        "timing": 0.16044, 
-        "get_events_time": 0.0010707200000000003, 
-        "find_ids_time": 0.15936928, 
-        "marsh_time": 0.00047034000000000014
+        "find_events": 0.16435113999999998, 
+        "get_events_time": 0.0010964800000000006, 
+        "find_ids_time": 0.16919457912445068, 
+        "overall": 0.16591594, 
+        "marsh_time": 0.00046832
     }
 }
\ No newline at end of file

_______________________________________________
Mailing list: https://launchpad.net/~zeitgeist
Post to     : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp

Reply via email to