Skip to content

Commit 5df5fb3

Browse files
committed
Update numbers from 2021 MacBook Pro M1 Max
1 parent f40843f commit 5df5fb3

File tree

2 files changed

+28
-67
lines changed

2 files changed

+28
-67
lines changed

demo.adoc

Lines changed: 22 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -404,72 +404,32 @@ Args=--initialize-at-build-time=com.okta.rest \
404404
== Startup Time Comparison
405405

406406
. Run each image three times before recording the numbers, then each command five times.
407+
+
408+
TIP: Use the link:start.sh[`start.sh`] script to get the real time, not what each framework prints to the console.
407409

408410
. Write each time down, add them up, and divide by five for the average. For example:
409411
+
410412
----
411-
Micronaut: (19 + 18 + 17 + 12 + 19) / 5 = 17
412-
Micronaut (optimized): (18 + 15 + 19 + 20 + 17) / 5 = 17.8
413-
Quarkus: (29 + 26 + 27 + 29 + 25) / 5 = 27.2
414-
Spring Boot: (42 + 43 + 37 + 44 + 36) / 5 = 40.4
415-
Helidon*: (50 + 52 + 42 + 53 + 55) / 5 = 50.4
416-
Helidon (optimized): (33 + 34 + 38 + 37 + 36) / 5 = 35.6
413+
Micronaut: (51 + 50 + 51 + 47 + 47) / 5 = 49.2
414+
Micronaut (optimized): (49 + 50 + 48 + 52 + 57) / 5 = 51.2
415+
Quarkus: (48 + 44 + 46 + 49 + 54) / 5 = 48.2
416+
Spring Boot: (70 + 70 + 75 + 73 + 69) / 5 = 71.4
417+
Helidon: (66 + 68 + 62 + 64 + 73) / 5 = 66.6
418+
Helidon (optimized): (42 + 44 +68 + 49 + 66) / 5 = 53.8
417419
----
418-
+
419-
NOTE: Helidon https://github.com/helidon-io/helidon/issues/7784[requires Java 20].
420420

421421
.Native Java startup times in milliseconds
422422
|===
423423
|Framework | Command executed | Milliseconds to start
424424

425-
|Micronaut | `./micronaut/build/native/nativeCompile/app` | 17
426-
|Micronaut (optimized) | `./micronaut/build/native/nativeOptimizedCompile/app` | 17.8
427-
|Quarkus | `./quarkus/build/quarkus-1.0.0-SNAPSHOT-runner` | 27.2
428-
|Spring Boot | `./spring-boot/build/native/nativeCompile/spring-boot` | 40.4
429-
|Helidon | `./helidon/target/helidon` | 50.4
430-
|Helidon (optimized) | https://github.com/oktadev/auth0-java-rest-api-examples/pull/2[auth0-java-rest-api-examples/pull/2] | 35.6
425+
|Micronaut | `./micronaut/build/native/nativeCompile/app` | 49.2
426+
|Micronaut (optimized) | `./micronaut/build/native/nativeOptimizedCompile/app` | 51.2
427+
|Quarkus | `./quarkus/build/quarkus-1.0.0-SNAPSHOT-runner` | 48.2
428+
|Spring Boot | `./spring-boot/build/native/nativeCompile/spring-boot` | 71.4
429+
|Helidon | `./helidon/target/helidon` | 66.6
430+
|Helidon (optimized) | https://github.com/oktadev/auth0-java-rest-api-examples/pull/2[auth0-java-rest-api-examples/pull/2] | 53.8
431431
|===
432432

433-
////
434-
October 19, 2023:
435-
- Micronaut: 17
436-
- Micronaut (optimized): 17.8
437-
- Quarkus: 27.2
438-
- Spring Boot: 40.4
439-
- Helidon: 50.4
440-
- Helidon (optimized): 35.6
441-
442-
October 17, 2023:
443-
- Micronaut: 16.2
444-
- Micronaut (optimized): 16
445-
- Quarkus: 27.8
446-
- Spring Boot: 38.4
447-
- Helidon: 49.2
448-
- Helidon (optimized): 23.8
449-
450-
August 2023:
451-
- Micronaut: 15.6
452-
- Micronaut (optimized): 14
453-
- Quarkus: 36.8
454-
- Spring Boot: 38.2
455-
- Helidon: 48.4
456-
- Helidon (optimized): 30.8
457-
458-
June 2023:
459-
- Micronaut: 33.4
460-
- Micronaut (optimized): 23.8
461-
- Quarkus: 25.8
462-
- Spring Boot: 39.8
463-
- Helidon: 47.6
464-
- Helidon (optimized): 33.2
465-
466-
October 2022:
467-
- Micronaut was 18
468-
- Quarkus was 20.6
469-
- Spring Boot was 39
470-
- Helidon was 43.2
471-
////
472-
473433
== Memory Usage Comparison
474434

475435
Test the memory usage in MB of each app using the command below. Make sure to send an HTTP request to each one before measuring.
@@ -483,14 +443,14 @@ Substitute `<executable>` as follows:
483443

484444
.Native Java memory used in megabytes
485445
|===
486-
|Framework | Executable | Megabytes after startup | Megabytes after 1 request| Megabytes after 5 requests
487-
488-
|Micronaut | `app` | 53 | 63 | 64
489-
|Micronaut (optimized) | `app` | 45 | 65 | 67
490-
|Quarkus | `quarkus` | 41 | 51 | 53
491-
|Spring Boot | `spring-boot` | 74 | 84 | 84
492-
|Helidon | `helidon` | 83 | 99 | 117
493-
|Helidon (optimized) | `helidon` | 72 | 89 | 123
446+
|Framework | Executable | Megabytes after startup | Megabytes after 1 request| Megabytes after 10 requests
447+
448+
|Micronaut | `app` | 53 | 62 | 66
449+
|Micronaut (optimized) | `app` | 53 | 63 | 67
450+
|Quarkus | `quarkus` | 37 | 48 | 52
451+
|Spring Boot | `spring-boot` | 76 | 86 | 87
452+
|Helidon | `helidon` | 82 | 92 | 93
453+
|Helidon (optimized) | `helidon` | 62 | 72 | 73
494454
|===
495455

496456
IMPORTANT: If you disagree with these numbers and think X framework should be faster, I encourage you to clone https://github.com/oktadev/auth0-java-rest-api-examples[this repo] and run these tests yourself.

memory.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ memory() {
4545
kill_cmd="fuser -k -n tcp 8080"
4646

4747
if [[ "$OSTYPE" == "darwin"* ]]; then
48-
kill_cmd="kill -9 $(lsof -i:8080 -t)"
48+
fkill --version || echo "fkill is missing. Install it using 'npm i -g fkill-cli'."
49+
kill_cmd="fkill :8080"
4950
fi
5051

5152
# Start the app in the background
@@ -66,13 +67,13 @@ while true; do
6667
echo -e "\n---- Memory usage after the first request:"
6768
memory $executable
6869

69-
# Make four more curl requests with an access token
70-
for ((i=1; i<=4; i++)); do
70+
# Make 9 more curl requests with an access token
71+
for ((i=1; i<=9; i++)); do
7172
curl -s -o /dev/null localhost:8080/hello -i --header "Authorization: Bearer $access_token"
7273
done
7374

74-
# Print out memory usage after five requests
75-
echo -e "\n---- Memory usage after five requests:"
75+
# Print out memory usage after 10 requests
76+
echo -e "\n---- Memory usage after 10 requests:"
7677
memory $executable
7778

7879
# Kill the app

0 commit comments

Comments
 (0)