opensource-observer / oso

Measuring the impact of open source software
https://opensource.observer
Apache License 2.0
74 stars 16 forks source link

Debug developer activity metrics #2274

Closed ccerv1 closed 1 month ago

ccerv1 commented 2 months ago

Which area(s) are affected? (leave empty if unsure)

Indexer

To Reproduce

Here is a query in Clickhouse:

select
    m.metric_id,
    m.metric_name,
    t.sample_date,
    t.amount
from metrics.timeseries_metrics_by_project_v0 as t
join metrics.metrics_v0 as m
    on t.metric_id = m.metric_id
join default.projects_v1 as p
    on t.project_id = p.project_id
where
    p.project_name = 'opensource-observer'
    and t.sample_date = '2024-09-22'
order by m.metric_name

Describe the Bug

We get back the following, which shows 1s for most fields.

image

Expected Behavior

The calculations are not correct (should not be 1s across the board). Moreover, it is not clear how active_developers and developer_active_days relate to each other.

ryscheng commented 2 months ago

https://github.com/opensource-observer/oso/pull/2270/files