예제 #1
0
print("{} rows {:1.4f}".format(qlen(c), end - start) +
      "s\nFetching finished runs (vdv) ...")
start = time.time()
c, n = rundb.get_finished_runs(skip=0,
                               limit=50,
                               username="******",
                               success_only=False,
                               ltc_only=False)
end = time.time()

print("{} rows {:1.4f}".format(qlen(c), end - start) + "s\nRequesting pgn ...")
if n == 0:
    c.append({"_id": "abc"})
start = time.time()
c = rundb.get_pgn(str(c[0]["_id"]) + ".pgn")
end = time.time()

# Tests: Explain some queries - should show which indexes are being used

print("{} rows {:1.4f}".format(qlen(c), end - start) + "s")
print("\n\nExplain queries")
print("\nFetching unfinished runs xp ...")
start = time.time()
c = runs.find({
    "finished": False
},
              sort=[("last_updated", DESCENDING),
                    ("start_time", DESCENDING)]).explain()
print(pprint.pformat(c, indent=3, width=110))
end = time.time()
예제 #2
0
  print(s)
  sys.stdout.flush()



printout("\nFetching unfinished runs ...")
start = time.time()
unfinished_runs = rundb.get_unfinished_runs()
end = time.time()

printout(str(end-start) + "s\nFetching machines ...")
start = time.time()
machines = rundb.get_machines()
end = time.time()

printout(str(end-start) + "s\nFetching finished runs ...")
start = time.time()
finished, num_finished = rundb.get_finished_runs(skip=0, limit=50, username='',
                                                 success_only=False, ltc_only=False)
end = time.time()

printout(str(end-start) + "s\nRequesting pgn ...")
if (len(finished) == 0):
    finished.append({'_id':'abc'})
start = time.time()
pgn = rundb.get_pgn(str(finished[0]['_id']) + ".pgn")
end = time.time()

printout(str(end-start) + "s\n")

예제 #3
0
start = time.time()
c, n = rundb.get_finished_runs(skip=0, limit=50, username='',
                                                 success_only=False, ltc_only=False)
end = time.time()

print("{} rows {:1.4f}".format(qlen(c), end-start) + "s\nFetching finished runs (vdv) ...")
start = time.time()
c, n = rundb.get_finished_runs(skip=0, limit=50, username='******',
                                                 success_only=False, ltc_only=False)
end = time.time()

print("{} rows {:1.4f}".format(qlen(c), end-start) + "s\nRequesting pgn ...")
if (n == 0):
    c.append({'_id':'abc'})
start = time.time()
c = rundb.get_pgn(str(c[0]['_id']) + ".pgn")
end = time.time()


# Tests: Explain some queries - should show which indexes are being used

print("{} rows {:1.4f}".format(qlen(c), end-start) + "s")
print("\n\nExplain queries")
print("\nFetching unfinished runs xp ...")
start = time.time()
c = runs.find({'finished': False}, sort=[('last_updated', DESCENDING), ('start_time', DESCENDING)]).explain()
print(pprint.pformat(c, indent=3, width=110))
end = time.time()

print("{} rows {:1.4f}".format(qlen(c), end-start) + "s")
print("\nFetching machines xp ...")