Fork me on GitHub
#core-async
<
2018-02-24
>
danboykis01:02:31

i want to time how long a request takes, my current strategy is to have a transducer on a chan that calls System/nanoTime and assign a :start-time with that value and then the callback itself calls nanoTime again and subtracts the :start-time assigning the :duration key to the final payload, it feels a bit clunky. Can anyone recommend an alternative?

hiredman02:02:13

I would stick with that, depending on what you want that kind of thing can end up a real rabbit hole

hiredman02:02:50

you might be able to do something neat with https://en.wikipedia.org/wiki/Little%27s_law#Finding_response_time if you just getting this monitoring, not actually reporting on each request how long it took

isaac09:02:55

this PR has no any respond?

danboykis18:02:13

@hiredman thanks, unfortunately i need to audit response times for individual requests, I did know about Little's Law though 🙂