package Ġme . me li jn . me lij nb ot . internals . web . rest . stats Ċ Ċ import Ġme . me li jn . me lij nb ot . internals . events . Event Manager Ċ import Ġme . me li jn . me lij nb ot . internals . web . RequestContext Ċ import Ġme . me li jn . me lij nb ot . internals . web . Web Utils . respond Json Ċ import Ġme . me li jn . me lij nb ot . object Mapper Ċ Ċ object ĠStats Response Handler Ġ{ ĊĊĠĠĠ Ġvar Ġlast Request Ġ= ĠSystem . currentTimeMillis () Ġ- Ġ 6 0 _ 0 0 0 ĊĊĠĠĠ Ġ@ Deprecated (" Marked Ġfor Ġremoval ", Ġreplace With Ġ= ĠReplace With (" Event Stats Response Handler # handle Event Stats Response ")) ĊĠĠĠ Ġsuspend Ġfun Ġhandle Stats Response ( context : ĠRequest Context ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval ĠdataObject Ġ= Ġcompute Base Object () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" events ", ĠobjectMapper . writeValue AsString ( Event Manager . event Count Map )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" last Point ", Ġlast Request ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" shards ", Ġcompute Public Stats Object ( context )) ĊĠĠĠĠĠĠĠ Ġreset Event Counter () ĊĠĠĠĠĠĠĠ Ġcontext . call . respond Json ( data Object ) ĊĠĠĠĠĠĠĠ Ġlast Request Ġ= ĠSystem . currentTimeMillis () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġreset Event Counter () Ġ{ ĊĠĠĠĠĠĠĠ Ġfor Ġ( event Ġin ĠEvent Manager . event Count Map . keys ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠEvent Manager . event Count Map [ event ] Ġ= Ġ 0 ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }