cncf / devstats.archive

📈CNCF-created tool for analyzing and graphing developer contributions
https://devstats.cncf.io/
Apache License 2.0
445 stars 147 forks source link

[feature request] Where do I know the update timestamp on devstats? #388

Closed atoato88 closed 1 year ago

atoato88 commented 1 year ago

I usually check the scores on k8s.devstats.cncf.io 1 time on every week. Recently, I sometimes confirmed the scores are exact same for 2 weeks. If I remember correctly, the scores were updated at least once a week.

I want to know the timestamp when the devstats score is updated at.

Could you suggest some instructions for knowing the timestamp? Or, could you add timestamp field to each page on k8s.devstats.cncf.io?

This may not be the feature request.. :thinking:

lukaszgryglicki commented 1 year ago

There is no such field, dashbioards are just regenrating. Can you point me to a dashboard that is not updated, maybe there is a problem with it - I'll check tomorrow or Friday?

lukaszgryglicki commented 1 year ago

And yes, last sync time would be a feature request - it will require quite a bit of work as all projects & dashboards would have to be udpated and recalculating logic would have to be updated to to store that value somewhere in DB - like table: last_update(dashboard, timesdtamp).

atoato88 commented 1 year ago

Thank you for quick response. :rocket: When I checked on today, the scores were updated.. :sweat_smile:

But I usually check this page(Community sizing and health assessment / Companies table) and this page(Contributor Statistics / Developer Activity Counts by Companies).

I remember this situation sometimes happens from end of the 2022. I will update this PR when I confirm this situation.

I wonder if the load(something score calculation) is so high in k8s repos, and the score is not updated..?

lukaszgryglicki commented 1 year ago

We are in progress of adding more nodes to DevStats - currently we struggle at on an old cluster with small numbe rof nodes and 140+ projects for both test & prod environments. Sometimes scores aren't updated and if anybody reports this I'm checking and fixing manually. This process of adding nodes cannot be faster - it's not depending on me, I'll update as soon as I get those new nodes - then I'll update to newest Kubernetes possible, move data around. Currently we're sometimes killed becaus eof too many pods/processes or OOM.

atoato88 commented 1 year ago

Wow... I see. I think it's so tough.

shu-mutou commented 1 year ago

@lukaszgryglicki Thank you for your efforts in maintaining and improving devstats. Reporting reliable data to the company is very important for us to continue contributing. It would be best if the data was updated daily, but I would be really happy if there was a data acquisition date even if it was updated once a week.

lukaszgryglicki commented 1 year ago

I will check and update on Friday or earlier.

lukaszgryglicki commented 1 year ago

Will check on Friday and will trey to add "last sync date" on Friday (not sure if I manage to do this in one day).

lukaszgryglicki commented 1 year ago

Manually imported newest affiliations (just to be sure they're up-to-date) and now regenerating requested dashboards. Then will add a table to keep last sync date and a dashboard allowing to check when given metric was last synced.

lukaszgryglicki commented 1 year ago

Update:

Now there is an extra documentation line (in the main page per project in Dashboard documentation section:

You can use 'Last updated' dashboard too see when given SQL metric was calculated - each dashboard has a list of its SQL metrics

There is also a new dashboard Last updated in each project, for example: https://all.devstats.cncf.io/d/82/last-updated?orgId=1 or https://k8s.devstats.cncf.io/d/82/last-updated?orgId=1

This dashboard lists which emtric were last calculated for a selected time range. Not all of them are refreshed yet - I'll do a final post when this is finished.

lukaszgryglicki commented 1 year ago

Example such dashboard in Thanos project:

Zrzut ekranu 2023-01-26 o 14 48 46
lukaszgryglicki commented 1 year ago

For k8s it will be: https://k8s.devstats.cncf.io/d/82/last-updated?orgId=1 (has no data yet, since I just added a table and k8s sync didn't happen yet).

lukaszgryglicki commented 1 year ago

those dashboards will now slowly popupate as new calculations come in. Closing this ticket as "done".

atoato88 commented 1 year ago

Thank you for quick update! I wait for the Last updated calculation to complete on k8s.

lukaszgryglicki commented 1 year ago

This will take some time because I decided to recalculate all k8s metrics. But this recalculation started before support was added, so they first need to recalculate all (without status in this dashboard) an dthe following syncs will appera there. here is example for All CNCF: https://all.devstats.cncf.io/d/82/last-updated?orgId=1 I will also add dashboard documentation describing what are all those time periods.

lukaszgryglicki commented 1 year ago

Dashboard documentation added, see k8s or all cncf for example:

lukaszgryglicki commented 1 year ago

Also live-patched K8s reinit pod to provide last update date to, I'm considering this ticket as done.

lukaszgryglicki commented 1 year ago

Updated dashboards everywhere to add new columns:

In addition to:

So now you will be able to see how long a given metric took to calculate and command used to calculate it (arguments to calc_metric call).

Note that because I added this just now, data generated so far don't have it, so I'm defaulting this to:

This will slowly be replaced with new version of calc_metric which fills that data.

Zrzut ekranu 2023-01-27 o 16 56 27

cc @caniszczyk @atoato88 @shu-mutou

lukaszgryglicki commented 1 year ago

Added one more column Milliseconds - it is easier to sort by numeric value than string representation Took, this is how it looks like:

Zrzut ekranu 2023-01-27 o 17 43 02 Zrzut ekranu 2023-01-27 o 17 43 42
atoato88 commented 1 year ago

It looks perfect!! :smiley: I think this issue is closed as done.

I will some comments if I have extra questions.

atoato88 commented 1 year ago

@lukaszgryglicki

I checked the values because it looks new score is applied.

I have one question. What timezone is used for displaying Finished at and Started at ? Is it UTC? or It depends on browser setting I use? or Other?

lukaszgryglicki commented 1 year ago

It is server's timezone, which happens to be UTC, now it is:

Thu Feb  2 06:34:17 UTC 2023
atoato88 commented 1 year ago

Thank you for quick response😃