screeps-ConsoleStats
screeps-ConsoleStats copied to clipboard
seems to be a problem with cpu usage
just creating base project with consolestats, screeps-profiler, and several task as uglify (but not on this project, because ecma 6 incompatible with last version of uglify according to this issue ).
[] as options
log tick 6430 CPU usage is far more 100%
Once I get off work I'll take a look at it. It is interesting that this would happen in the sim. I'll have to do some testing and see if the sim reflects production or not. I suspect it wont as the sim is dependent on your computer.
I don't see a problem with cpu usage in production. I average around 3 cpu units per call for everything.
I think it might be due to a bug in the sim code. It well known by veteran players that the sim isn't 100% 1:1 with production.
I would recommend trying it out in a private server if you can.
if ((Game.time % 1) === 0) {
let totalTime = Game.cpu.getUsed()
console.log(statsConsole.displayHistogram());
console.log(statsConsole.displayStats({ totalWidth: 100 }));
console.log(statsConsole.displayLogs(Memory.stats.logs, { width: 100 }));
totalTime = (Game.cpu.getUsed() - totalTime);
console.log("Time to Draw: " + totalTime.toFixed(2));
}