Mercurial Hosting > luan
changeset 2047:ea026254b3b6 default tip
show scheduler threads
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Sun, 09 Nov 2025 11:32:18 -0700 |
| parents | 905a6ade55f2 |
| children | |
| files | host/admin/src/private/tools/admin.html.luan |
| diffstat | 1 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/host/admin/src/private/tools/admin.html.luan Tue Nov 04 13:30:21 2025 -0700 +++ b/host/admin/src/private/tools/admin.html.luan Sun Nov 09 11:32:18 2025 -0700 @@ -9,6 +9,9 @@ local Runtime = require "java:java.lang.Runtime" local System = require "java:java.lang.System" local Server = require "java:goodjava.webserver.Server" +local threadPool = Server.threadPool +local ThreadLuan = require "java:luan.modules.ThreadLuan" +local scheduler = ThreadLuan.scheduler return function() @@ -29,9 +32,11 @@ local loadAverage = uri("os:uptime").read_text() --local loadAverage = new String(result).replaceAll(".*average:",""); - local threadPool = Server.threadPool local threads = threadPool.getPoolSize() local active_threads = threadPool.getActiveCount() + + local scheduler_threads = scheduler.getPoolSize() + local scheduler_active_threads = scheduler.getActiveCount() %> <!doctype html> <html lang="en"> @@ -57,9 +62,13 @@ <td><%=loadAverage%></td> </tr> <tr> - <td>Threads</td> + <td>Server Threads</td> <td><%= active_threads %> active, <%= threads - active_threads %> idle</td> </tr> + <tr> + <td>Scheduler Threads</td> + <td><%= scheduler_active_threads %> active, <%= scheduler_threads - scheduler_active_threads %> idle</td> + </tr> <table> <p><a href="admin.html?action=gc">Run GC</a></p>
