python类configure()的实例源码

benchmark.py 文件源码 项目:annotated-py-tornado 作者: hhstore 项目源码 文件源码 阅读 28 收藏 0 点赞 0 评论 0
def main():
    parse_command_line()
    if options.ioloop:
        IOLoop.configure(options.ioloop)
    for i in xrange(options.num_runs):
        run()
runtests.py 文件源码 项目:annotated-py-tornado 作者: hhstore 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def configure_ioloop():
        kwargs = {}
        if options.ioloop_time_monotonic:
            from tornado.platform.auto import monotonic_time
            if monotonic_time is None:
                raise RuntimeError("monotonic clock not found")
            kwargs['time_func'] = monotonic_time
        if options.ioloop or kwargs:
            IOLoop.configure(options.ioloop, **kwargs)
benchmark.py 文件源码 项目:annotated-py-tornado 作者: hhstore 项目源码 文件源码 阅读 31 收藏 0 点赞 0 评论 0
def main():
    parse_command_line()
    if options.ioloop:
        IOLoop.configure(options.ioloop)
    for i in xrange(options.num_runs):
        run()
runtests.py 文件源码 项目:get_started_with_respeaker 作者: respeaker 项目源码 文件源码 阅读 28 收藏 0 点赞 0 评论 0
def configure_ioloop():
        kwargs = {}
        if options.ioloop_time_monotonic:
            from tornado.platform.auto import monotonic_time
            if monotonic_time is None:
                raise RuntimeError("monotonic clock not found")
            kwargs['time_func'] = monotonic_time
        if options.ioloop or kwargs:
            IOLoop.configure(options.ioloop, **kwargs)
benchmark.py 文件源码 项目:aweasome_learning 作者: Knight-ZXW 项目源码 文件源码 阅读 28 收藏 0 点赞 0 评论 0
def main():
    parse_command_line()
    if options.ioloop:
        IOLoop.configure(options.ioloop)
    for i in xrange(options.num_runs):
        run()
application_test.py 文件源码 项目:tailsocket 作者: yeraydiazdiaz 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def get_new_ioloop(self):
        """Override the creation of the IOLoop mimicking that of application.

        The result needs to be a Tornado IOLoop instance, we first configure
        the asyncio loop and then call IOLoop configure to use it.

        """
        if sys.platform == 'linux':
            selector = selectors.SelectSelector()
            loop = asyncio.SelectorEventLoop(selector)
            asyncio.set_event_loop(loop)

        IOLoop.configure('tornado.platform.asyncio.AsyncIOLoop')
        return IOLoop.current()
benchmark.py 文件源码 项目:browser_vuln_check 作者: lcatro 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def main():
    parse_command_line()
    if options.ioloop:
        IOLoop.configure(options.ioloop)
    for i in xrange(options.num_runs):
        run()
benchmark.py 文件源码 项目:LinuxBashShellScriptForOps 作者: DingGuodong 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def main():
    parse_command_line()
    if options.ioloop:
        IOLoop.configure(options.ioloop)
    for i in xrange(options.num_runs):
        run()
benchmark.py 文件源码 项目:ProgrameFacil 作者: Gpzim98 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def main():
    parse_command_line()
    if options.ioloop:
        IOLoop.configure(options.ioloop)
    for i in xrange(options.num_runs):
        run()


问题


面经


文章

微信
公众号

扫码关注公众号