Together-Java / JShellPlaygroundBackend

API to execute custom JShell code.
GNU General Public License v3.0
3 stars 3 forks source link

[Feature/SessionStats] Endpoint to fetch session data #26

Open Alathreon opened 5 months ago

Alathreon commented 5 months ago

Pull-request

Changes

Closes Issue: NaN

Description

Add an endpoint to fetch the stats of the current sessions. Exemple:

curl --request GET \
  --url http://localhost:8080/jshell/sessions
[
    {
        "id": "test",
        "timeSinceCreation": 17,
        "timeUntilExpiration": 1782,
        "totalEvalTime": 15,
        "doingOperation": false
    },
    {
        "id": "135178a3-e54f-4bc8-bbe1-2e626b4de50b",
        "timeSinceCreation": 12,
        "timeUntilExpiration": 14,
        "totalEvalTime": 2,
        "doingOperation": false
    }
]