Vexed01 / Vex-Cogs

My cogs for Red.
https://cogdocs.vexcodes.com
GNU General Public License v3.0
28 stars 21 forks source link

[stattrack] status command drops to 0 in metrics upon update/reloading the cog. #71

Closed Skyridr closed 2 years ago

Skyridr commented 2 years ago

What cog is this bug report for?

stattrack

What versions are you running?

           Your Version    Latest version    Up to date?

This Cog 1.8.0 1.8.0 🟢 Bundled Utils 0c6bf04 0c6bf04 🟢 Red 3.4.13 3.4.16 🔴

Describe the bug

I just updated to 1.8.0, and checked the status metrics (all). And I noticed a drop to 0 due to I assume the update / reload of the cog:

image

Not sure if this is intended as I am not sure if it should use previous data (or skip the missing data on the metrics) before the reload. Making a issue about it just in case.

If there's an error, paste it here

No response

Vexed01 commented 2 years ago

That's really odd. It didn't happen to me. It appears to non-smoothly increase which suggests it's a data issue and not a cog issue.

The intended behaviour is that there would be a gap in the graph.

Maybe take a look at [p]stattrack status 2h to see this section in more detail? If it is a gradual increase then it's something wrong with the data which I can't fix on my end. I could also take a look at [p]stattrack export json if you are happy to share it so I can take a further look, though this would be tomorrow (UTC+0).

Skyridr commented 2 years ago

Sorry about the delay. I posted this when I was heading to bed. You are right, this was an issue on a single bot. I'm running the exact same cog on the same server on a different bot, and that has no data "corruption" so to speak.

Here's the data of 8 hours ago (when I ran the command this morning before I was heading to work):

image

And running (all) on my second bot with no issues:

image

Don't ask me why I'm running the same cog on a different bot :p. Maybe I found it useful to check out RED's process information on each bot.

Here's the json file (I've changed the file extension from json to log as github was refusing json files).

stattrack.log

Hope it's useful!

Vexed01 commented 2 years ago

Thanks for providing further details.

Looking at the export, what happened is that you updated around 20:10/20:11 and then the counts fell at 20:12. Between 20:11 and 20:12, your total user count remained constant. As you can see in the graph, the online/idle/dnd user counts dropped to almost zero. It seems for whatever reason all these users went to being offline, as offline jumped from 151655 to 156417, which is a difference around the same as the total online/idle/dnd before. All the other statistics in the export look normal.

I'm not sure what caused this, so I'm afraid I'll have to close the issue. I haven't been able to reproduce this myself either.

Hopefully it won't happen again...

Skyridr commented 2 years ago

It seems to have happened 2 more times over thee past few days:

image

Same occurred on my other bot as well:

image