Benchmarking Parts of the Application
Learn how to benchmark parts of a Deno application.
We'll cover the following...
Now, we’ll have a sneak peek at one feature that might be further down the path of our applications. One day, we’ll start having parts of the application that seem to be getting slow and we want to track their performance, and that’s where performance tests are useful. Because of this, we’ll be introducing benchmarks.
Benchmark the Deno application
When it comes to writing benchmarks in JavaScript, the language itself provides a few functions, all of which are included in the High Resolution Time API.
Because Deno is fully ES6 compatible, these same features are available. If we look at Deno’s standard library or the official website, we see that benchmarks are taken into a lot of consideration and are tracked across Deno versions. Upon checking Deno’s source code, we see that there is a very nice set of examples regarding how to write them. ...