質問

I have compiled SpiderMonkey from source and i try to measure Execution times of some functions . When i run the code inside Firefox browser using Scratchpad or plain Console session i have tools like : console.time() , console.timeEnd() , and performance.now() . This works fine for me , but when i run the code inside SpiderMonkey engine i dont have those tools available , Using Date() does not give precise results .

What tools are available inside SpiderMonkey for this type of scenarios ?

役に立ちましたか?

解決

There's dateNow() function, and there's also PerfMeasurement object (don't mind the mentions of the jsm code module, the API is directly available in the shell, although only on Linux at the moment).

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top