In this section, we will measure the performance of an example microservice compiled with two options: without optimizations, and with optimizations made by a compiler. The microservice will send rendered index page to clients. And we will use the Welle tool to measure the performance of this microservice to see if we can improve it.
Measuring and optimizing performance
Basic example
Let's create a microservice in a new crate based on the actix-web crate.
Add the following dependencies to Cargo.toml:
[dependencies]
actix = "0.7"
actix-web = "0.7"
askama = "0.6"
chrono = "0.4"
env_logger = "0.5"
futures = "0.1"
[build-dependencies]
askama = "0.6"...