Пример #1
0
def thread_4():
    c.log_bmark("Server thread spawned")

    c.log_start("Logging in", bookmark=True)
    sleep(0.1)
    c.log_start("Search database")
    sleep(0.3)
    c.log_endok("Search database")
    c.log_start("Initialise session for 'laura'")
    sleep(0.3)
    c.log_endok("Initialise session for 'laura'")
    c.log_start("Render")
    sleep(0.1)
    c.log_endok("Render")
    c.log_endok("Logging in")

    sleep(0.2)

    c.log_start("Repeat login", bookmark=True)
    sleep(0.2)
    c.log_ender("Repeat login")

    sleep(0.2)

    c.log_start("Read article", bookmark=True)
    sleep(0.05)
    c.log_start("Search database")
    sleep(0.3)
    c.log_endok("Search database")
    c.log_start("Render")
    sleep(0.1)
    c.log_endok("Render")
    sleep(0.05)
    c.log_endok("Read article")
Пример #2
0
def thread_4():
    c.log_bmark("Server thread spawned")

    c.log_start("Logging in", bookmark=True)
    sleep(0.1)
    c.log_start("Search database")
    sleep(0.3)
    c.log_endok("Search database")
    c.log_start("Initialise session for 'laura'")
    sleep(0.3)
    c.log_endok("Initialise session for 'laura'")
    c.log_start("Render")
    sleep(0.1)
    c.log_endok("Render")
    c.log_endok("Logging in")

    sleep(0.2)

    c.log_start("Repeat login", bookmark=True)
    sleep(0.2)
    c.log_ender("Repeat login")

    sleep(0.2)

    c.log_start("Read article", bookmark=True)
    sleep(0.05)
    c.log_start("Search database")
    sleep(0.3)
    c.log_endok("Search database")
    c.log_start("Render")
    sleep(0.1)
    c.log_endok("Render")
    sleep(0.05)
    c.log_endok("Read article")
Пример #3
0
def thread_3():
    c.log_bmark("Server thread spawned")

    sleep(0.2)

    c.log_start("Read article", bookmark=True)
    sleep(0.05)
    c.log_start("Search database")
    sleep(0.3)
    c.log_endok("Search database")
    c.log_start("Render")
    sleep(0.1)
    c.log_endok("Render")
    sleep(0.05)
    c.log_endok("Read article")

    sleep(0.4)

    c.log_start("Post comment", bookmark=True)
    sleep(0.05)
    c.log_start("Create")
    sleep(0.3)
    c.log_endok("Create")
    c.log_start("Render")
    sleep(0.1)
    c.log_endok("Render")
    sleep(0.05)
    c.log_endok("Post comment")
Пример #4
0
def thread_3():
    c.log_bmark("Server thread spawned")

    sleep(0.2)

    c.log_start("Read article", bookmark=True)
    sleep(0.05)
    c.log_start("Search database")
    sleep(0.3)
    c.log_endok("Search database")
    c.log_start("Render")
    sleep(0.1)
    c.log_endok("Render")
    sleep(0.05)
    c.log_endok("Read article")

    sleep(0.4)

    c.log_start("Post comment", bookmark=True)
    sleep(0.05)
    c.log_start("Create")
    sleep(0.3)
    c.log_endok("Create")
    c.log_start("Render")
    sleep(0.1)
    c.log_endok("Render")
    sleep(0.05)
    c.log_endok("Post comment")
Пример #5
0
def thread_2():
    c.log_bmark("Server thread spawned")

    sleep(0.7)

    c.log_start("User profile", bookmark=True)
    sleep(0.1)
    c.log_start("Search database")
    sleep(0.3)
    c.log_endok("Search database")
    c.log_start("Render")
    sleep(0.1)
    c.log_endok("Render")
    c.log_endok("Logging in")
Пример #6
0
    def __call__(self, environ, start_response):
        name = environ.get("PATH_INFO", "") + "?" + environ.get("QUERY_STRING", "")
        active = not name.startswith("/static/")

        if active:
            ctx.set_log(self.log_url)
            ctx.set_profile(True)
            ctx.log_bmark(name)

        response = self.app(environ, start_response)

        if active:
            ctx.set_profile(False)
        return response
Пример #7
0
def thread_2():
    c.log_bmark("Server thread spawned")

    sleep(0.7)

    c.log_start("User profile", bookmark=True)
    sleep(0.1)
    c.log_start("Search database")
    sleep(0.3)
    c.log_endok("Search database")
    c.log_start("Render")
    sleep(0.1)
    c.log_endok("Render")
    c.log_endok("Logging in")
Пример #8
0
    def __call__(self, environ, start_response):
        name = environ.get("PATH_INFO", "") + "?" + environ.get(
            "QUERY_STRING", "")
        active = not name.startswith("/static/")

        if active:
            ctx.set_log(self.log_url)
            ctx.set_profile(True)
            ctx.log_bmark(name)

        response = self.app(environ, start_response)

        if active:
            ctx.set_profile(False)
        return response
Пример #9
0
def thread():
    c.log_bmark("Server thread spawned")

    for n in range(0, 4):
        time.sleep(random.random() * 0.5)

        c.log_start("Processing Video", bookmark=True)

        c.log_start("Reading file")
        time.sleep(1 + random.random() * 2.0)
        c.log_endok("")

        with lock:
            c.log_start("Adding to archive")
            time.sleep(1 + random.random() * 2.0)
            c.log_endok("")

        c.log_endok("")
Пример #10
0
def thread():
    c.log_bmark("Server thread spawned")

    for n in range(0, 4):
        time.sleep(random.random() * 0.5)

        c.log_start("Processing Video", bookmark=True)

        c.log_start("Reading file")
        time.sleep(1 + random.random() * 2.0)
        c.log_endok("")

        with lock:
            c.log_start("Adding to archive")
            time.sleep(1 + random.random() * 2.0)
            c.log_endok("")

        c.log_endok("")
Пример #11
0
 def test_log_bmark(self):
     c.log_bmark("boooookmark")