Show HN: Get Rails performance metrics into Chrome Dev Tools
github.com
github.com
Application instrumentation - whether via Prometheus, StatsD, Scout, New Relic - solves a very different problem than this. The server timing metrics here are actually extracted from an APM tool (Scout), so you get the best of both worlds.
With those tools, you do not get immediate feedback on the timing breakdown of a web request. At worst, the metrics are heavily aggregated. At best, you'll need to wait a couple of minutes for a trace.
Profiling tools that give immediate feedback on server-side production performance have their place, just like those that collect and aggregate metrics over time.
As a side note, we've been using miniprofiler[0] for a long while now, and it has some limitations, but can be very useful some times.
I'll see if there's anything we can do on our side (I'm the DevTools tech writer), but I think it's an API limitation. We might be able to use some arbitrary convention in the timing values that let's us plot along a time series...
[1] https://camo.githubusercontent.com/bc62621acd195d11d0247c0cc...
Author here - I believe that's the case. There isn't a way to specific start & end time: https://w3c.github.io/server-timing/#dom-performanceserverti...
That said, the spec also mentions:
> To minimize the HTTP overhead the provided names and descriptions should be kept as short as possible - e.g. use abbreviations and omit optional values where possible.
I could see significant issues if we tried to send data in timeline fashion (such as creating a metric for each database record call in an N+1 scenario).
One idea: pass down an URI (ie - https://scoutapp.com/r/ID) that when clicked, provides full trace information.
Aside: I've used scout on a production application and it is similar in quality to new relic but far simpler to understand.
Is there an automated way of getting the average of a performance metric (eg Time spent in AR) over N requests?
Small world!
> Is there an automated way of getting the average of a performance metric (eg Time spent in AR) over N requests?
I'm assuming you mean w/Chrome dev tools + server timing?
Not that I'm aware of...DevTools is an area I'd like to explore more though.
Anyone know of a similar tool for Python3/flask (or wsgi probably)?
The server timing metrics here are actually extracted from an APM tracing tool (Scout).
Tracing services generally do not give immediate feedback on the timing breakdown of a web request. At worst, the metrics are heavily aggregated. At best, you'll need to wait a couple of minutes for a trace.
The Server Timing API (which is how this works) give immediate performance information, shortening the feedback loop and allowing you to do a quick gut-check on a slow request before jumping to your tracing tool.