From 7180c9acccc6fbf6b321e41e4381ed235cd2876e Mon Sep 17 00:00:00 2001 From: "lxx.imac" Date: Fri, 14 Jun 2019 15:52:33 +0800 Subject: [PATCH] update: v0.3.0 --- .travis.yml | 1 + src/LifeCycle/workEstimate.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3e08fe5..6c1f67c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,7 @@ language: node_js node_js: - "10" before_deploy: + - npx stylus ./dist/main.styl - npm run build - echo "demo.costream.org" >> dist/CNAME deploy: diff --git a/src/LifeCycle/workEstimate.js b/src/LifeCycle/workEstimate.js index a39b728..38cbf6b 100644 --- a/src/LifeCycle/workEstimate.js +++ b/src/LifeCycle/workEstimate.js @@ -13,7 +13,7 @@ export function WorkEstimate(ssg) /* 检查每一个operatorNode的body(包括init,work和window)*/ var body = flat.contents.operBody; var w_init = 0//body.init ? body.init.WorkEstimate(): 0 ; - var w_steady = 60 //body.work ? body.work.WorkEstimate() : 0; + var w_steady = (body.work + '').match(/\w+|[-+*/=<>?:]/g).length *10 //body.work ? body.work.WorkEstimate() : 0; w_steady += (flat.outFlatNodes.length + flat.inFlatNodes.length) * 20; //多核下调整缓冲区head和tail ssg.mapInitWork2FlatNode.set(flat, w_init) ssg.mapSteadyWork2FlatNode.set(flat, w_steady)