Store metrics

Hello,

At the risk of sounding like a stats crazed maniac, are the store metrics broken? The last results I see are for the 7th.

Cheers,

Roger

Confirmed here. Seems stats stopped updating after the 7th.
Interestingly metrics isn’t a thing that’s monitored at https://status.snapcraft.io/

Metrics are only calculated for entire days, and there’s a processing delay of about 12 hours. snapcraft.io currently shows metrics up to the 8th, and the results for the 9th will be available in around 10 minutes.

One possible cause for confusion is that hovering over a region in the graph always shows a tooltip for the start of the region. Since the 8th is currently the last point in the graph, there’s no region after it from which you can get a tooltip for the 8th, but you can always get the latest total from the top right of graph.

1 Like

In fact, I think there might be a timezone-related bug with the tooltips. With my browser running in UTC+11 the tooltip changes from the 8th to the 9th about half way between them, while in UTC it is the 8th all the way.

You might be right, and so the recent DST change may have manifested this change in not being able to see the previous day of results, whereas previously (in UTC+1) it was difficult but possible.

This is what I see right now with my mouse all the way over to the right. As the red part ain’t zero high something is definitely up :slight_smile:

Screenshot_20181110_125329

3 Likes

Thanks for this, we recently changed the date library we use and looks like we missed something.

I’ll make sure we’re dealing with UTC everywhere.

3 Likes

Yes, that’s confusing and makes it impossible to see the subtotals for the current day.

I would expect the tooltip to match round(point), not floor(point). (I was surprised that the subtotals didn’t match the total at the top of the graph.)

We’re using UTC throughout however, we only requests metrics from a specific time each day no matter when the user loads the page.

This has the benefit of reducing the number of hits against the store with more efficient caching but also has the side effect that depending on where you are in the world you’ll start seeing yesterdays metrics at different times in the day.

I’ve made some changes to help mitigate the delay and welcome feedback if people notice any difference (for better or worse). I’ve also offset the tick hover area by half a day so the x-axis ticks should represent midday - day changes should be halfway between ticks - allowing access to the final days data.

Cheers!

1 Like

Works for me. Thanks!

1 Like