Beispiel #1
0
 def concurrent_engine_quotes(num=4):
     engine = Engine(best_ip=True, thread_num=num)
     engine.connect()
     engine.stock_list.index.tolist()
     now = datetime.now()
     engine.stock_quotes()
     return (datetime.now() - now).total_seconds()
Beispiel #2
0
 def original_engine_quotes():
     engine = Engine(best_ip=True)
     engine.connect()
     engine.stock_list.index.tolist()
     now = datetime.now()
     engine.stock_quotes()
     return (datetime.now() - now).total_seconds()
Beispiel #3
0
def engine_func(best_ip, thread_num):
    engine = Engine(best_ip=best_ip, thread_num=thread_num)

    with engine.connect():
        assert engine.best_ip is not None
        assert engine.gbbq is not None
        assert engine.security_list is not None
        assert engine.stock_quotes() is not None
        assert engine.customer_block is not None
        assert engine.quotes('000001') is not None
        assert engine.get_security_bars('000001', '1m') is not None
        assert engine.get_security_bars('000001', '1d') is not None
        assert engine.get_security_bars('000300', '1m', index=True) is not None
        assert engine.get_security_bars('000300', '1d', index=True) is not None
        assert engine.concept is not None
        assert engine.fengge is not None
        assert engine.index is not None
        assert engine.stock_list is not None