This repo contains the slides and example code for the Thinktecture Webinar about .NET Native AOT, held on March 6th 2024.
Watch the Webinar in German language on YouTube:
To run the example, please ensure that you have the following things installed:
Execute the following statements on a command line of your choice:
docker compose -f docker-compose.postgres-dev.yml up -d
cd WebApp
dotnet publish -o bin/native-aot
cd bin/native-aotThis will spin up a PostgreSQL database and publish the ASP.NET Core app in Native AOT mode.
On Windows, use ./WebApp.exe to start the app. On Mac OS X and Linux, use ./WebApp instead.
You can then use the WebApp/requests.http file to issue different requests against the web app. Rider, Visual Studio and Visual Studio Code have built-in support for .http files.
To execute the spike load test, you need to have Grafana k6 installed.
You should first checkout the corresponding branch in git:
git checkout in-memory-spike-testIn one terminal, start the web app in regular CLR mode (make sure that no other instance is running on localhost:5000):
cd WebApp
dotnet run -c ReleaseThen execute k6 in another terminal:
k6 run spike-test.jsAfter the test, do the same thing for the Native AOT version and compare the results.
