Exemple #1
0
def main():
    s = store.Store("tags.axiom")
    c = tags.Catalog(store=s)

    objects = []
    def createObjects():
        for x in range(N):
            objects.append(TaggedObject(store=s))
    s.transact(createObjects)

    def tagObjects():
        for o in objects:
            for x in range(N):
                c.tag(o, str(x))
    s.transact(tagObjects)

    def getTags():
        for i in range(N):
            for o in objects:
                for t in c.tagsOf(o):
                    pass

    benchmark.start()
    s.transact(getTags)
    benchmark.stop()
def main():
    s = Store()
    start()
    for i in xrange(N_RENDERS):
        fragment = ConfiguredGrabbersView(s)
        render(fragment)
    stop()
Exemple #3
0
def main():
    s = Store()
    start()
    for i in xrange(N_RENDERS):
        fragment = ConfiguredGrabbersView(s)
        render(fragment)
    stop()
def main():
    s = store.Store("spam.axiom")
    # DSPAM requires a Store with a parent, since the parent has the global
    # training state.
    s.parent = s

    # xquotient.dspam requires an account name to work at all.
    account = userbase.LoginAccount(store=s)
    userbase.LoginMethod(store=s,
                         account=account,
                         localpart=u"testuser",
                         domain=u"example.com",
                         verified=True,
                         internal=False,
                         protocol=userbase.ANY_PROTOCOL)

    classifier = spam.Filter(store=s)
    # Don't install it because there's no MessageSource: it won't install,
    # but it works well enough like this for the benchmark.
    classifier.installedOn = s
    dspam = spam.DSPAMFilter(store=s).installOn(classifier)

    def process():
        for i in xrange(10000):
            classifier.processItem(Message())
    benchmark.start()
    s.transact(process)
    benchmark.stop()
def main():
    s = Store("TEMPORARY.axiom")
    rows = [(x, unicode(x)) for x in xrange(10000)]
    s.transact(lambda: s.batchInsert(AB, (AB.a, AB.b), rows))

    benchmark.start()
    s.transact(s.query(AB).deleteFromStore)
    benchmark.stop()
def main():
    s = Store("TEMPORARY.axiom")
    rows = [(x, unicode(x)) for x in xrange(10000)]
    s.transact(lambda: s.batchInsert(AB, (AB.a, AB.b), rows))

    benchmark.start()
    s.transact(s.query(AB).deleteFromStore)
    benchmark.stop()
Exemple #7
0
def main():
    s = Store("TEMPORARY.axiom")
    def txn():
        for x in range(10000):
            AB(a=x, b=unicode(x), store=s)

    benchmark.start()
    s.transact(txn)
    benchmark.stop()
def main(fragmentClass):
    """
    Benchmark L{N_RENDERS} calls of L{renderOnce}.
    """
    s = Store()
    start()
    for i in xrange(N_RENDERS):
        renderOnce(fragmentClass)
    stop()
Exemple #9
0
def main(fragmentClass):
    """
    Benchmark L{N_RENDERS} calls of L{renderOnce}.
    """
    s = Store()
    start()
    for i in xrange(N_RENDERS):
        renderOnce(fragmentClass)
    stop()
def main():
    s = Store("TEMPORARY.axiom")
    def txn():
        for x in range(10000):
            AB(a=x, b=str(x), store=s)

    benchmark.start()
    s.transact(txn)
    benchmark.stop()
Exemple #11
0
def main():
    s = store.Store("lucene.axiom")
    indexer = fulltext.PyLuceneIndexer(store=s)

    benchmark.start()
    writer = indexer.openWriteIndex()
    for i in xrange(10000):
        writer.add(Message())
    writer.close()
    benchmark.stop()
Exemple #12
0
def main():
    inbox = createInboxWithManyMessages()
    screen = InboxScreen(inbox)

    start()
    for i in xrange(N_LOOKUPS):
        for v in VIEWS:
            screen.changeView(v)
            screen.getLastMessage()
    stop()
def main():
    s = store.Store("lucene.axiom")
    indexer = fulltext.PyLuceneIndexer(store=s)

    benchmark.start()
    writer = indexer.openWriteIndex()
    for i in xrange(10000):
        writer.add(Message())
    writer.close()
    benchmark.stop()
def main():
    s = Store("TEMPORARY.axiom")
    rows = [(x, str(x)) for x in range(10000)]
    s.transact(lambda: s.batchInsert(AB, (AB.a, AB.b), rows))
    def deleteStuff():
        for it in s.query(AB):
            it.deleteFromStore()
    benchmark.start()
    s.transact(deleteStuff)
    benchmark.stop()
def main():
    inbox = createInboxWithManyMessages()
    screen = InboxScreen(inbox)

    start()
    for i in xrange(N_LOOKUPS):
        for v in VIEWS:
            screen.changeView(v)
            screen.getFirstMessage()
    stop()
def main():
    inbox = createInboxWithManyMessages()
    screen = InboxScreen(inbox)

    when = screen.getMessageAfter(screen.getFirstMessage())

    start()
    for i in xrange(N_LOOKUPS):
        for v in VIEWS:
            screen.changeView(v)
            screen.getMessageBefore(when)
    stop()
def main():
    inbox = createInboxWithManyMessages()
    screen = InboxScreen(inbox)

    when = screen.getMessageBefore(screen.getLastMessage())

    start()
    for i in xrange(N_LOOKUPS):
        for v in VIEWS:
            screen.changeView(v)
            screen.getMessageAfter(when)
    stop()
Exemple #18
0
def main():
    s, userStore = initializeStore()
    g = grabber.POP3Grabber(store=userStore,
                            username=u"testuser",
                            password=u"password",
                            domain=u"127.0.0.1",
                            port=12345)
    scheduler.IScheduler(userStore).schedule(g, extime.Time())
    StoppingMessageFilter(store=userStore,
                          totalMessages=TOTAL_MESSAGES).installOn(userStore)

    pop3server = filepath.FilePath(__file__).sibling("pop3server.tac")
    os.system("twistd -y " + pop3server.path)
    benchmark.start()
    os.system("axiomatic -d wholesystem.axiom start -n")
    benchmark.stop()
    os.system("kill `cat twistd.pid`")
Exemple #19
0
def main():
    s = store.Store("tags.axiom")
    c = tags.Catalog(store=s)
    o = TaggedObject(store=s)

    def tagObjects(tag, copies):
        for x in xrange(copies):
            c.tag(o, tag)
    for i in xrange(N_TAGS):
        s.transact(tagObjects, unicode(i), N_COPIES)

    def getTags():
        for i in xrange(N_LOOPS):
            list(c.tagNames())

    benchmark.start()
    s.transact(getTags)
    benchmark.stop()
def main():
    s, userStore = initializeStore()

    MailTransferAgent(store=userStore).installOn(userStore)
    MailTransferAgent(store=s, portNumber=12345).installOn(s)

    StoppingMessageFilter(store=userStore,
                          totalMessages=TOTAL_MESSAGES).installOn(userStore)

    smtpclient = FilePath(__file__).sibling('smtpclient.tac')
    system("SMTP_SERVER_PORT=%d "
           "SMTP_MESSAGE_COUNT=%d "
           "SMTP_RECIPIENT_ADDRESS=%s "
           "twistd -y %s" % (12345, TOTAL_MESSAGES, "testuser@localhost", smtpclient.path))
    start()
    system("axiomatic -d wholesystem.axiom start -n")
    stop()
    system("kill `cat twistd.pid`")
def main():
    s, userStore = initializeStore()
    g = grabber.POP3Grabber(
        store=userStore,
        username=u"testuser",
        password=u"password",
        domain=u"127.0.0.1",
        port=12345)
    scheduler.IScheduler(userStore).schedule(g, extime.Time())
    StoppingMessageFilter(store=userStore,
                          totalMessages=TOTAL_MESSAGES).installOn(userStore)

    pop3server = filepath.FilePath(__file__).sibling("pop3server.tac")
    os.system("twistd -y " + pop3server.path)
    benchmark.start()
    os.system("axiomatic -d wholesystem.axiom start -n")
    benchmark.stop()
    os.system("kill `cat twistd.pid`")
Exemple #22
0
def main():
    s = store.Store("tags.axiom")
    c = tags.Catalog(store=s)
    o = TaggedObject(store=s)

    def tagObjects(tag, copies):
        for x in range(copies):
            c.tag(o, tag)

    for i in range(N_TAGS):
        s.transact(tagObjects, str(i), N_COPIES)

    def getTags():
        for i in range(N_LOOPS):
            list(c.tagNames())

    benchmark.start()
    s.transact(getTags)
    benchmark.stop()
def main():
    s, userStore = initializeStore()

    MailTransferAgent(store=userStore).installOn(userStore)
    MailTransferAgent(store=s, portNumber=12345).installOn(s)

    StoppingMessageFilter(store=userStore,
                          totalMessages=TOTAL_MESSAGES).installOn(userStore)

    smtpclient = FilePath(__file__).sibling('smtpclient.tac')
    system("SMTP_SERVER_PORT=%d "
           "SMTP_MESSAGE_COUNT=%d "
           "SMTP_RECIPIENT_ADDRESS=%s "
           "twistd -y %s" %
           (12345, TOTAL_MESSAGES, "testuser@localhost", smtpclient.path))
    start()
    system("axiomatic -d wholesystem.axiom start -n")
    stop()
    system("kill `cat twistd.pid`")
Exemple #24
0
def main():
    s = store.Store("stats.axiom")
    sampler = stats.StatSampler(store=s)
    t = extime.Time()
    svc = stats.StatsService(store=s, currentMinuteBucket=100)
    for x in range(100):

        scope = stats.Statoscope("")
        scope._stuffs = {'bandwidth_http_down': 0, u'_axiom_query:SELECT main.item_xquotient_grabber_pop3uid_v1.[value] FROM main.item_xquotient_grabber_pop3uid_v1 WHERE (main.item_xquotient_grabber_pop3uid_v1.[grabberID] = ?)  ': 0, 'autocommits': 0, u'_axiom_query:SELECT main.item_login_system_v1.oid, main.item_login_system_v1.[failedLogins], main.item_login_system_v1.[loginCount] FROM main.item_login_system_v1   ': 0, u'_axiom_query:SELECT main.item_axiom_powerup_connector_v1.oid, main.item_axiom_powerup_connector_v1.[interface], main.item_axiom_powerup_connector_v1.[item], main.item_axiom_powerup_connector_v1.[powerup], main.item_axiom_powerup_connector_v1.[priority] FROM main.item_axiom_powerup_connector_v1 WHERE ((main.item_axiom_powerup_connector_v1.[interface] = ?) AND (main.item_axiom_powerup_connector_v1.[item] = ?)) ORDER BY main.item_axiom_powerup_connector_v1.[priority] DESC ': 0, u'_axiom_query:SELECT main.item_xmantissa_stats_statsservice_v1.oid, main.item_xmantissa_stats_statsservice_v1.[currentMinuteBucket], main.item_xmantissa_stats_statsservice_v1.[currentQuarterHourBucket], main.item_xmantissa_stats_statsservice_v1.[installedOn] FROM main.item_xmantissa_stats_statsservice_v1   LIMIT 2': 0, 'Imaginary logins': 0, 'bandwidth_pop3-grabber_down': 0, u'pop3uid_check': 0, 'bandwidth_pop3s_down': 0, 'actionExecuted': 0, u'_axiom_query:SELECT main.item_login_v2.oid, main.item_login_v2.[avatars], main.item_login_v2.[disabled], main.item_login_v2.[password] FROM main.item_login_v2, main.item_login_method_v2 WHERE ((main.item_login_method_v2.[domain] = ?) AND (main.item_login_method_v2.[localpart] = ?) AND (main.item_login_v2.[disabled] = ?) AND (main.item_login_method_v2.[account] = main.item_login_v2.oid))  ': 0, 'bandwidth_pop3_down': 0, u'_axiom_query:SELECT main.item_login_method_v2.oid, main.item_login_method_v2.[account], main.item_login_method_v2.[domain], main.item_login_method_v2.[internal], main.item_login_method_v2.[localpart], main.item_login_method_v2.[protocol], main.item_login_method_v2.[verified] FROM main.item_login_method_v2   ': 0, 'bandwidth_ssh_up': 0, 'cursor_execute_time': 0, 'actionDuration': 0, 'bandwidth_smtps_up': 0, 'messages_grabbed': 0, u'_axiom_query:SELECT main.item_login_v2.oid, main.item_login_v2.[avatars], main.item_login_v2.[disabled], main.item_login_v2.[password] FROM main.item_login_v2   ': 0, 'bandwidth_smtps_down': 0, u'_axiom_query:SELECT main.item_xmantissa_stats_statbucket_v1.oid, main.item_xmantissa_stats_statbucket_v1.[index], main.item_xmantissa_stats_statbucket_v1.[interval], main.item_xmantissa_stats_statbucket_v1.[time], main.item_xmantissa_stats_statbucket_v1.[type], main.item_xmantissa_stats_statbucket_v1.[value] FROM main.item_xmantissa_stats_statbucket_v1 WHERE ((main.item_xmantissa_stats_statbucket_v1.[type] = ?) AND (main.item_xmantissa_stats_statbucket_v1.[interval] = ?) AND ((main.item_xmantissa_stats_statbucket_v1.[index] >= ?) OR (main.item_xmantissa_stats_statbucket_v1.[index] <= ?)))  ': 0, u'_axiom_query:SELECT main.item_timed_event_v1.oid, main.item_timed_event_v1.[runnable], main.item_timed_event_v1.[time] FROM main.item_timed_event_v1  ORDER BY main.item_timed_event_v1.[time] ASC LIMIT 1': 0, 'page_renders': 0, 'bandwidth_sip_up': 0, u'_axiom_query:SELECT main.item_persistent_session_v1.oid, main.item_persistent_session_v1.[authenticatedAs], main.item_persistent_session_v1.[lastUsed], main.item_persistent_session_v1.[sessionKey] FROM main.item_persistent_session_v1 WHERE (main.item_persistent_session_v1.[sessionKey] = ?)  ': 0, 'cache_hits': 0, u'_axiom_query:SELECT main.item_login_v2.oid, main.item_login_v2.[avatars], main.item_login_v2.[disabled], main.item_login_v2.[password] FROM main.item_login_v2 WHERE (main.item_login_v2.[disabled] != ?)  ': 0, 'athena_messages_sent': 0, u'_axiom_query:SELECT main.item_axiom_batch__reliablelistener_v1.oid, main.item_axiom_batch__reliablelistener_v1.[backwardMark], main.item_axiom_batch__reliablelistener_v1.[forwardMark], main.item_axiom_batch__reliablelistener_v1.[lastRun], main.item_axiom_batch__reliablelistener_v1.[listener], main.item_axiom_batch__reliablelistener_v1.[processor], main.item_axiom_batch__reliablelistener_v1.[style] FROM main.item_axiom_batch__reliablelistener_v1 WHERE ((main.item_axiom_batch__reliablelistener_v1.[processor] = ?) AND (main.item_axiom_batch__reliablelistener_v1.[style] = ?) AND main.item_axiom_batch__reliablelistener_v1.[listener] NOT IN ()) ORDER BY main.item_axiom_batch__reliablelistener_v1.[lastRun] ASC ': 0, u'_axiom_query:SELECT main.item_login_v2.oid, main.item_login_v2.[avatars], main.item_login_v2.[disabled], main.item_login_v2.[password] FROM main.item_login_v2, main.item_login_method_v2 WHERE ((main.item_login_method_v2.[domain] IS NULL) AND (main.item_login_method_v2.[localpart] = ?) AND (main.item_login_v2.[disabled] = ?) AND (main.item_login_method_v2.[account] = main.item_login_v2.oid))  ': 0, '_axiom_query:SELECT main.item_xmantissa_stats_statbucket_v1.oid, main.item_xmantissa_stats_statbucket_v1.[index], main.item_xmantissa_stats_statbucket_v1.[interval], main.item_xmantissa_stats_statbucket_v1.[time], main.item_xmantissa_stats_statbucket_v1.[type], main.item_xmantissa_stats_statbucket_v1.[value] FROM main.item_xmantissa_stats_statbucket_v1 WHERE ((main.item_xmantissa_stats_statbucket_v1.[index] = ?) AND (main.item_xmantissa_stats_statbucket_v1.[interval] = ?))  ': 0, 'bandwidth_telnet_up': 0, u'_axiom_query:SELECT main.item_mantissa_installed_offering_v1.oid, main.item_mantissa_installed_offering_v1.[application], main.item_mantissa_installed_offering_v1.[offeringName] FROM main.item_mantissa_installed_offering_v1 WHERE (main.item_mantissa_installed_offering_v1.[offeringName] = ?)  LIMIT 1': 0, 'bandwidth_pop3_up': 0, u'_axiom_query:SELECT main.item_imaginary_wiring_realm_playercredentials_v1.oid, main.item_imaginary_wiring_realm_playercredentials_v1.[actor], main.item_imaginary_wiring_realm_playercredentials_v1.[password], main.item_imaginary_wiring_realm_playercredentials_v1.[username] FROM main.item_imaginary_wiring_realm_playercredentials_v1 WHERE (main.item_imaginary_wiring_realm_playercredentials_v1.[actor] = ?)  ': 0, 'bandwidth_sip_down': 0, 'bandwidth_http_up': 0, u'_axiom_query:SELECT main.item_axiom_subscheduler_parent_hook_v1.oid, main.item_axiom_subscheduler_parent_hook_v1 main.item_xmantissa_search_searchresult_v1.[identifier], main.item_xmantissa_search_searchresult_v1.[indexedItem] FROM main.item_xmantissa_search_searchresult_v1 WHERE (main.item_xmantissa_search_searchresult_v1.[indexedItem] = ?)  ': 0, u'_axiom_query:SELECT main.item_timed_event_v1.oid, main.item_timed_event_v1.[runnable], main.item_timed_event_v1.[time] FROM main.item_timed_event_v1 WHERE (main.item_timed_event_v1.[time] < ?) ORDER BY main.item_timed_event_v1.[time] ASC LIMIT 1': 0, 'POP3 logins': 0, 'cursor_blocked_time': 0, 'bandwidth_smtp_up': 0, 'messagesReceived': 0, u'_axiom_query:SELECT main.item_imaginary_objects_exit_v1.oid, main.item_imaginary_objects_exit_v1.[fromLocation], main.item_imaginary_objects_exit_v1.[name], main.item_imaginary_objects_exit_v1.[sibling], main.item_imaginary_objects_exit_v1.[toLocation] FROM main.item_imaginary_objects_exit_v1 WHERE (main.item_imaginary_objects_exit_v1.[toLocation] = ?)  ': 0, '_axiom_query:SELECT main.item_xmantissa_stats_statbucket_v1.oid, main.item_xmantissa_stats_statbucket_v1.[index], main.item_xmantissa_stats_statbucket_v1.[interval], main.item_xmantissa_stats_statbucket_v1.[time], main.item_xmantissa_stats_statbucket_v1.[type], main.item_xmantissa_stats_statbucket_v1.[value] FROM main.item_xmantissa_stats_statbucket_v1 WHERE ((main.item_xmantissa_stats_statbucket_v1.[interval] = ?) AND (main.item_xmantissa_stats_statbucket_v1.[type] = ?) AND (main.item_xmantissa_stats_statbucket_v1.[time] = ?))  ': 0, 'bandwidth_telnet_down': 0, u'_axiom_query:SELECT main.item_mantissa_installed_offering_v1.[offeringName] FROM main.item_mantissa_installed_offering_v1   ': 0, 'bandwidth_smtp_down': 0, 'mimePartsCreated': 0, u'_axiom_query:SELECT main.item_imaginary_objects_exit_v1.oid, main.item_imaginary_objects_exit_v1.[fromLocation], main.item_imaginary_objects_exit_v1.[name], main.item_imaginary_objects_exit_v1.[sibling], main.item_imaginary_objects_exit_v1.[toLocation] FROM main.item_imaginary_objects_exit_v1 WHERE (main.item_imaginary_objects_exit_v1.[fromLocation] = ?)  ': 0, 'bandwidth_pop3-grabber_up': 0, '_axiom_query:SELECT main.item_xmantissa_stats_statbucket_v1.oid, main.item_xmantissa_stats_statbucket_v1.[index], main.item_xmantissa_stats_statbucket_v1.[interval], main.item_xmantissa_stats_statbucket_v1.[time], main.item_xmantissa_stats_statbucket_v1.[type], main.item_xmantissa_stats_statbucket_v1.[value] FROM main.item_xmantissa_stats_statbucket_v1 WHERE ((main.item_xmantissa_stats_statbucket_v1.[index] = ?) AND (main.item_xmantissa_stats_statbucket_v1.[interval] = ?) AND (main.item_xmantissa_stats_statbucket_v1.[type] = ?))  ': 0, u'_axiom_query:SELECT main.item_developer_site_v1.oid, main.item_developer_site_v1.[administrators], main.item_developer_site_v1.[developers] FROM main.item_developer_site_v1   ': 0, 'Web logins': 0, 'cache_misses': 0}
        sampler.service = svc
        sampler.doStatSample(s, scope, t, [])
        t = t + datetime.timedelta(minutes=1)

    asf = webadmin.AdminStatsFragment()
    asf._initializeObserver = lambda : None
    asf.svc = svc
    benchmark.start()
    asf.buildPie()
    benchmark.stop()
def main():
    s, userStore = benchmark_initialize.initializeStore()

    g = grabber.POP3Grabber(
        store=userStore,
        username=u'testuser',
        password=u'password',
        domain=u'127.0.0.1',
        port=12345)

    def createPOP3UIDs():
        msg = Message()
        for i in xrange(10000 * FACTOR):
            g.markSuccess(str(i), msg)
    userStore.transact(createPOP3UIDs)

    def filterPOP3UIDs():
        for i in xrange(20000 * FACTOR / 100):
            r = xrange(i * 100, i * 100 + 100)
            g.shouldRetrieve(list(enumerate(map(str, r))))
    benchmark.start()
    userStore.transact(filterPOP3UIDs)
    benchmark.stop()
Exemple #26
0
def main():
    s, userStore = benchmark_initialize.initializeStore()

    g = grabber.POP3Grabber(store=userStore,
                            username=u'testuser',
                            password=u'password',
                            domain=u'127.0.0.1',
                            port=12345)

    def createPOP3UIDs():
        msg = Message()
        for i in xrange(10000 * FACTOR):
            g.markSuccess(str(i), msg)

    userStore.transact(createPOP3UIDs)

    def filterPOP3UIDs():
        for i in xrange(20000 * FACTOR / 100):
            r = xrange(i * 100, i * 100 + 100)
            g.shouldRetrieve(list(enumerate(map(str, r))))

    benchmark.start()
    userStore.transact(filterPOP3UIDs)
    benchmark.stop()
Exemple #27
0
def main():
    benchmark.start()
    initializeStore()
    benchmark.stop()
def main():
    s = store.Store("stats.axiom")
    sampler = stats.StatSampler(store=s)
    t = extime.Time()
    svc = stats.StatsService(store=s, currentMinuteBucket=100)
    for x in range(100):

        scope = stats.Statoscope("")
        scope._stuffs = {
            'bandwidth_http_down': 0,
            'bandwidth_pop3_up': 0,
            'bandwidth_sip_up': 0,
            'Imaginary logins': 0,
            'bandwidth_pop3-grabber_down': 0,
            'SMTP logins': 0,
            'actionExecuted': 0,
            'bandwidth_pop3_down': 0,
            'bandwidth_ssh_up': 0,
            'cursor_execute_time': 0.15660834312438965,
            'actionDuration': 0,
            'bandwidth_smtps_up': 0,
            'messages_grabbed': 0,
            'bandwidth_smtps_down': 0,
            'athena_messages_sent': 0,
            'page_renders': 0,
            'autocommits': 0,
            'cache_hits': 7,
            'bandwidth_telnet_up': 0,
            'bandwidth_smtp_up': 0,
            'bandwidth_sip_down': 0,
            'bandwidth_http_up': 0,
            'commits': 9,
            'messagesSent': 0,
            'bandwidth_ssh_down': 0,
            'athena_messages_received': 0,
            'bandwidth_https_up': 0,
            'bandwidth_https_down': 0,
            'cache_misses': 9,
            'bandwidth_pop3s_down': 0,
            'POP3 logins': 0,
            'cursor_blocked_time': 0.0,
            'messagesReceived': 0,
            'bandwidth_telnet_down': 0,
            'bandwidth_smtp_down': 0,
            'mimePartsCreated': 0,
            'bandwidth_pop3-grabber_up': 0,
            'Web logins': 0,
            'bandwidth_pop3s_up': 0
        }
        queryscope = stats.Statoscope("")
        queryscope._stuffs = {
            u'_axiom_query:SELECT main.item_axiom_batch__reliablelistener_v1.oid, main.item_axiom_batch__reliablelistener_v1.[backwardMark], main.item_axiom_batch__reliablelistener_v1.[forwardMark], main.item_axiom_batch__reliablelistener_v1.[lastRun], main.item_axiom_batch__reliablelistener_v1.[listener], main.item_axiom_batch__reliablelistener_v1.[processor], main.item_axiom_batch__reliablelistener_v1.[style] FROM main.item_axiom_batch__reliablelistener_v1 WHERE ((main.item_axiom_batch__reliablelistener_v1.[processor] = ?) AND (main.item_axiom_batch__reliablelistener_v1.[style] = ?) AND main.item_axiom_batch__reliablelistener_v1.[listener] NOT IN ()) ORDER BY main.item_axiom_batch__reliablelistener_v1.[lastRun] ASC ':
            0,
            u'_axiom_query:SELECT main.item_xquotient_grabber_pop3uid_v1.[value] FROM main.item_xquotient_grabber_pop3uid_v1 WHERE (main.item_xquotient_grabber_pop3uid_v1.[grabberID] = ?)  ':
            0,
            u'_axiom_query:SELECT main.item_axiom_powerup_connector_v1.oid, main.item_axiom_powerup_connector_v1.[interface], main.item_axiom_powerup_connector_v1.[item], main.item_axiom_powerup_connector_v1.[powerup], main.item_axiom_powerup_connector_v1.[priority] FROM main.item_axiom_powerup_connector_v1 WHERE ((main.item_axiom_powerup_connector_v1.[interface] = ?) AND (main.item_axiom_powerup_connector_v1.[item] = ?)) ORDER BY main.item_axiom_powerup_connector_v1.[priority] DESC ':
            0,
            u'_axiom_query:SELECT main.item_xmantissa_stats_statsservice_v1.oid, main.item_xmantissa_stats_statsservice_v1.[currentMinuteBucket], main.item_xmantissa_stats_statsservice_v1.[currentQuarterHourBucket], main.item_xmantissa_stats_statsservice_v1.[installedOn] FROM main.item_xmantissa_stats_statsservice_v1   LIMIT 2':
            0,
            u'_axiom_query:SELECT main.item_login_v2.oid, main.item_login_v2.[avatars], main.item_login_v2.[disabled], main.item_login_v2.[password] FROM main.item_login_v2, main.item_login_method_v2 WHERE ((main.item_login_method_v2.[domain] = ?) AND (main.item_login_method_v2.[localpart] = ?) AND (main.item_login_v2.[disabled] = ?) AND (main.item_login_method_v2.[account] = main.item_login_v2.oid))  ':
            0,
            u'_axiom_query:SELECT main.item_login_method_v2.oid, main.item_login_method_v2.[account], main.item_login_method_v2.[domain], main.item_login_method_v2.[internal], main.item_login_method_v2.[localpart], main.item_login_method_v2.[protocol], main.item_login_method_v2.[verified] FROM main.item_login_method_v2   ':
            0,
            u'_axiom_query:SELECT main.item_timed_event_v1.oid, main.item_timed_event_v1.[runnable], main.item_timed_event_v1.[time] FROM main.item_timed_event_v1 WHERE (main.item_timed_event_v1.[time] < ?) ORDER BY main.item_timed_event_v1.[time] ASC LIMIT 1':
            0,
            u'_axiom_query:SELECT main.item_login_v2.oid, main.item_login_v2.[avatars], main.item_login_v2.[disabled], main.item_login_v2.[password] FROM main.item_login_v2   ':
            0,
            u'_axiom_query:SELECT main.item_xmantissa_stats_statbucket_v1.oid, main.item_xmantissa_stats_statbucket_v1.[index], main.item_xmantissa_stats_statbucket_v1.[interval], main.item_xmantissa_stats_statbucket_v1.[time], main.item_xmantissa_stats_statbucket_v1.[type], main.item_xmantissa_stats_statbucket_v1.[value] FROM main.item_xmantissa_stats_statbucket_v1 WHERE ((main.item_xmantissa_stats_statbucket_v1.[type] = ?) AND (main.item_xmantissa_stats_statbucket_v1.[interval] = ?) AND ((main.item_xmantissa_stats_statbucket_v1.[index] >= ?) OR (main.item_xmantissa_stats_statbucket_v1.[index] <= ?)))  ':
            0,
            u'_axiom_query:SELECT main.item_timed_event_v1.oid, main.item_timed_event_v1.[runnable], main.item_timed_event_v1.[time] FROM main.item_timed_event_v1  ORDER BY main.item_timed_event_v1.[time] ASC LIMIT 1':
            0,
            u'_axiom_query:SELECT main.item_persistent_session_v1.oid, main.item_persistent_session_v1.[authenticatedAs], main.item_persistent_session_v1.[lastUsed], main.item_persistent_session_v1.[sessionKey] FROM main.item_persistent_session_v1 WHERE (main.item_persistent_session_v1.[sessionKey] = ?)  ':
            0,
            u'_axiom_query:SELECT main.item_login_v2.oid, main.item_login_v2.[avatars], main.item_login_v2.[disabled], main.item_login_v2.[password] FROM main.item_login_v2 WHERE (main.item_login_v2.[disabled] != ?)  ':
            0,
            u'_axiom_query:SELECT main.item_login_v2.oid, main.item_login_v2.[avatars], main.item_login_v2.[disabled], main.item_login_v2.[password] FROM main.item_login_v2, main.item_login_method_v2 WHERE ((main.item_login_method_v2.[domain] IS NULL) AND (main.item_login_method_v2.[localpart] = ?) AND (main.item_login_v2.[disabled] = ?) AND (main.item_login_method_v2.[account] = main.item_login_v2.oid))  ':
            0,
            u'_axiom_query:SELECT main.item_mantissa_installed_offering_v1.oid, main.item_mantissa_installed_offering_v1.[application], main.item_mantissa_installed_offering_v1.[offeringName] FROM main.item_mantissa_installed_offering_v1 WHERE (main.item_mantissa_installed_offering_v1.[offeringName] = ?)  LIMIT 1':
            0,
            u'_axiom_query:SELECT main.item_imaginary_wiring_realm_playercredentials_v1.oid, main.item_imaginary_wiring_realm_playercredentials_v1.[actor], main.item_imaginary_wiring_realm_playercredentials_v1.[password], main.item_imaginary_wiring_realm_playercredentials_v1.[username] FROM main.item_imaginary_wiring_realm_playercredentials_v1 WHERE (main.item_imaginary_wiring_realm_playercredentials_v1.[actor] = ?)  ':
            0,
            u'_axiom_query:SELECT main.item_login_system_v1.oid, main.item_login_system_v1.[failedLogins], main.item_login_system_v1.[loginCount] FROM main.item_login_system_v1   ':
            0,
            '_axiom_query:SELECT main.item_xmantissa_stats_statbucket_v1.oid, main.item_xmantissa_stats_statbucket_v1.[index], main.item_xmantissa_stats_statbucket_v1.[interval], main.item_xmantissa_stats_statbucket_v1.[time], main.item_xmantissa_stats_statbucket_v1.[type], main.item_xmantissa_stats_statbucket_v1.[value] FROM main.item_xmantissa_stats_statbucket_v1 WHERE ((main.item_xmantissa_stats_statbucket_v1.[interval] = ?) AND (main.item_xmantissa_stats_statbucket_v1.[type] = ?) AND (main.item_xmantissa_stats_statbucket_v1.[time] = ?))  ':
            0,
            '_axiom_query:SELECT main.item_xmantissa_stats_statbucket_v1.oid, main.item_xmantissa_stats_statbucket_v1.[index], main.item_xmantissa_stats_statbucket_v1.[interval], main.item_xmantissa_stats_statbucket_v1.[time], main.item_xmantissa_stats_statbucket_v1.[type], main.item_xmantissa_stats_statbucket_v1.[value] FROM main.item_xmantissa_stats_statbucket_v1 WHERE ((main.item_xmantissa_stats_statbucket_v1.[interval] = ?) AND (main.item_xmantissa_stats_statbucket_v1.[type] = ?) AND (main.item_xmantissa_stats_statbucket_v1.[time] = ?))  ':
            0,
            '_axiom_query:SELECT main.item_xmantissa_stats_statbucket_v1.oid, main.item_xmantissa_stats_statbucket_v1.[index], main.item_xmantissa_stats_statbucket_v1.[interval], main.item_xmantissa_stats_statbucket_v1.[time], main.item_xmantissa_stats_statbucket_v1.[type], main.item_xmantissa_stats_statbucket_v1.[value] FROM main.item_xmantissa_stats_statbucket_v1 WHERE ((main.item_xmantissa_stats_statbucket_v1.[index] = ?) AND (main.item_xmantissa_stats_statbucket_v1.[interval] = ?))  ':
            0,
            u'_axiom_query:SELECT main.item_imaginary_objects_exit_v1.oid, main.item_imaginary_objects_exit_v1.[fromLocation], main.item_imaginary_objects_exit_v1.[name], main.item_imaginary_objects_exit_v1.[sibling], main.item_imaginary_objects_exit_v1.[toLocation] FROM main.item_imaginary_objects_exit_v1 WHERE (main.item_imaginary_objects_exit_v1.[toLocation] = ?)  ':
            0,
            u'_axiom_query:SELECT main.item_mantissa_installed_offering_v1.[offeringName] FROM main.item_mantissa_installed_offering_v1   ':
            0,
            u'_axiom_query:SELECT main.item_imaginary_objects_exit_v1.oid, main.item_imaginary_objects_exit_v1.[fromLocation], main.item_imaginary_objects_exit_v1.[name], main.item_imaginary_objects_exit_v1.[sibling], main.item_imaginary_objects_exit_v1.[toLocation] FROM main.item_imaginary_objects_exit_v1 WHERE (main.item_imaginary_objects_exit_v1.[fromLocation] = ?)  ':
            0,
            u'_axiom_query:SELECT main.item_axiom_subscheduler_parent_hook_v1.oid, main.item_axiom_subscheduler_parent_hook_v1 main.item_xmantissa_search_searchresult_v1.[identifier], main.item_xmantissa_search_searchresult_v1.[indexedItem] FROM main.item_xmantissa_search_searchresult_v1 WHERE (main.item_xmantissa_search_searchresult_v1.[indexedItem] = ?)  ':
            0,
            '_axiom_query:SELECT main.item_xmantissa_stats_statbucket_v1.oid, main.item_xmantissa_stats_statbucket_v1.[index], main.item_xmantissa_stats_statbucket_v1.[interval], main.item_xmantissa_stats_statbucket_v1.[time], main.item_xmantissa_stats_statbucket_v1.[type], main.item_xmantissa_stats_statbucket_v1.[value] FROM main.item_xmantissa_stats_statbucket_v1 WHERE ((main.item_xmantissa_stats_statbucket_v1.[index] = ?) AND (main.item_xmantissa_stats_statbucket_v1.[interval] = ?) AND (main.item_xmantissa_stats_statbucket_v1.[type] = ?))  ':
            0,
            u'_axiom_query:SELECT main.item_developer_site_v1.oid, main.item_developer_site_v1.[administrators], main.item_developer_site_v1.[developers] FROM main.item_developer_site_v1   ':
            0
        }
        sampler.service = svc
        sampler.doStatSample(s, scope, t, [])
        sampler.doStatSample(s,
                             queryscope,
                             t, [],
                             bucketType=stats.QueryStatBucket)
        t = t + datetime.timedelta(minutes=1)

    asf = webadmin.AdminStatsFragment()
    asf._initializeObserver = lambda: None
    asf.svc = svc
    benchmark.start()
    asf.buildPie()
    benchmark.stop()
def main():
    benchmark.start()
    initializeStore()
    benchmark.stop()
def main():
    s = Store("TEMPORARY.axiom")
    benchmark.start()
    rows = [(x, str(x)) for x in range(10000)]
    s.transact(lambda: s.batchInsert(AB, (AB.a, AB.b), rows))
    benchmark.stop()