سؤال

I have an inherited an app that is fairly small and written in Scala. This app does search operations against a database. While I would prefer to use Node.js, I need some ammo to do the migration from Scala to Node.js. For that reason, I'd like to build some performance benchmarks. If Node.js performance is better than Scala, then it helps. If the performance gains aren't there, its a bigger up-hill battle.

Can someone tell me how I could create some performance benchmarks between Scala and Node.js? I don't know what I should be measuring in a solid benchmark test.

Thank you!

هل كانت مفيدة؟

المحلول

I am not familiar with scala but all benchmarks must be made on a clean install machine not running anything else (and not in a virtual machine). It should display cpu load, memory load and time to complete (and potential errors).

What you want to show in the benchmark is that node.js is better suited to do parallel tasks with low memory/cpu footprint. So node.js is able to perform all queries at once async while scala will need to wait since its synchronous and should finish faster. And of course, it also matters if you are using an database abstraction layer (like mongoose in node.js for mongodb) which can change the outcome.

you also could come from a maintainability aspect or from a "see how fast I coded that thing?"

But at least you know you are cheating; the bottleneck is the database, not the language executing the queries :)

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top