[enh] Better reach %CPU configuration
proof.ts now relies on a CPU profiler, which allows for nearly perfect respect of the CPU% configuration.
Works very well both with ARM and Intel. Thus, the specific code for ARM has been removed from Duniter. The CPU% is now a generic configuration which works on every platform.
About reduce_cpu
This code don't interfere with @vincentrou 's code, except that the number of tests/second now takes into account the number of cores.
So if the lower limit to reach with ecomode = true
is 300, then it will 300 for the whole machine (not 300 per core).
About speed
I could notice a slight improvement in unit tests (few seconds).
Merge request reports
Activity
cc @librelois
cc @moul
assigned to @vincentrou
@c-geek you can tag directly the @nodes/typescript group and it notifies all its members ;)
On this branch, the tests fail at my home: /
Edited by ÉloïsI have :
703 passing (3m) 1 failing 1) Linting eslint should have no errors in app: Error: TypeError: Cannot read property 'length' of undefined at Context.<anonymous> (/home/duniter/duniter/node_modules/mocha-eslint/index.js:14:13) at callFn (/home/duniter/duniter/node_modules/mocha/lib/runnable.js:348:21) at Test.Runnable.run (/home/duniter/duniter/node_modules/mocha/lib/runnable.js:340:7) at Runner.runTest (/home/duniter/duniter/node_modules/mocha/lib/runner.js:443:10) at /home/duniter/duniter/node_modules/mocha/lib/runner.js:549:12 at next (/home/duniter/duniter/node_modules/mocha/lib/runner.js:361:14) at /home/duniter/duniter/node_modules/mocha/lib/runner.js:371:7 at next (/home/duniter/duniter/node_modules/mocha/lib/runner.js:295:14) at Immediate.<anonymous> (/home/duniter/duniter/node_modules/mocha/lib/runner.js:339:5) at runCallback (timers.js:672:20) at tryOnImmediate (timers.js:645:5) at processImmediate [as _immediateCallback] (timers.js:617:5)
Edited by ÉloïsTests crashes for me : https://pastebin.com/Fwx6S08D
It also took around 15 minutes to get there.Edited by nanocryk@nanocryk Please check that you did merge the reduce_cpu and reduce_cpu_improvements before testing. I don't know exactly why (and havn't searched), but these 2 MR are required.
Because I've coded this
better_cpu_branch
based onreduce_cpu
and then splitted the code into 3 commits. There is some code missing somewhere.mentioned in merge request !1218 (merged)