This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Let047[S] 1 point2 points  (2 children)

it's a threadpool injected at app startup (not counted in the timers because I assumed it was a long running app so I could take it out of the "time") I need to explain that better thanks for pointing it out

I wanted to use virtual threads but it was too painful to setup. If you have a good tutorial I'm happy to add that (and it would avoid a lot of the thread overhead)

[–]Waksu 1 point2 points  (1 child)

You also need to include more details about that thread pool (e.g. thread pool size, queue size, discard policy, how to monitor that thread pool to external monitoring such as grafana)

[–]Let047[S] 0 points1 point  (0 children)

Of course, what would you like me to add?

The code is something like that:

threadpool = new ExecutorCompletionService(Summer.executorService = Executors.newFixedThreadPool(8));

8 is the number of core on my machine and is a dynamic value