|
|
@@ -52,7 +52,7 @@ class Quant:
|
|
|
r = psutil.cpu_times_percent(percpu=True)
|
|
|
for i in range(cpu_count):
|
|
|
cpu_used_pct[i] += int(r[i].user)
|
|
|
- time.sleep(1)
|
|
|
+ time.sleep(0.1)
|
|
|
print(cpu_used_pct)
|
|
|
cpu_id = cpu_used_pct.index(min(cpu_used_pct))
|
|
|
print(f"当前负载最低的cpu为:{cpu_id}")
|
|
|
@@ -438,6 +438,8 @@ class Quant:
|
|
|
# 更新策略时间
|
|
|
self.strategy.local_time = time.time()
|
|
|
orders = self.strategy.onTime(self.tradeMsg)
|
|
|
+ self.logger.info("update_local_order订单指令")
|
|
|
+ self.logger.info(orders)
|
|
|
### 记录指令触发信息
|
|
|
if self._not_empty(orders):
|
|
|
self.logger.debug("触发onOrder")
|
|
|
@@ -630,6 +632,8 @@ class Quant:
|
|
|
self.strategy.local_time = time.time()
|
|
|
# 产生交易信号
|
|
|
orders = self.strategy.onTime(self.tradeMsg)
|
|
|
+ self.logger.info("_update_depth订单指令")
|
|
|
+ self.logger.info(orders)
|
|
|
### 记录指令触发信息
|
|
|
if self._not_empty(orders):
|
|
|
self.logger.debug("触发onTick")
|