Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

capture bucketed repo sizes in pings#48211

Merged
coury-clark merged 5 commits into
mainfrom
cclark/bucket-repo-size-ping
Mar 8, 2023
Merged

capture bucketed repo sizes in pings#48211
coury-clark merged 5 commits into
mainfrom
cclark/bucket-repo-size-ping

Conversation

@coury-clark

@coury-clark coury-clark commented Feb 24, 2023

Copy link
Copy Markdown
Contributor

Slack thread for context s

Adds repository size buckets to pings. This would be useful to partition pings between monorepo customers and multirepo customers, which is something we lack in pings today. Note that this doesn't filter on cloned repos, which we may want to do?

The buckets are somewhat arbitrarily defined, with the assumption that the most interesting buckets are somewhere in the 5-100 GB range.

lt = less than
gte = greater than equals
both are given in bytes

Test plan

Ping from running locally:

"repository_size_histogram": [
        {
            "lt": 1000,
            "count": 0
        },
        {
            "lt": 1000000,
            "gte": 1000,
            "count": 2
        },
        {
            "lt": 1000000000,
            "gte": 1000000,
            "count": 4
        },
        {
            "lt": 5000000000,
            "gte": 1000000000,
            "count": 1
        },
        {
            "lt": 15000000000,
            "gte": 5000000000,
            "count": 0
        },
        {
            "lt": 25000000000,
            "gte": 15000000000,
            "count": 0
        },
        {
            "lt": 50000000000,
            "gte": 25000000000,
            "count": 0
        },
        {
            "lt": 100000000000,
            "gte": 50000000000,
            "count": 0
        },
        {
            "gte": 100000000000,
            "count": 0
        }
    ],

@cla-bot cla-bot Bot added the cla-signed label Feb 24, 2023
@coury-clark coury-clark self-assigned this Feb 24, 2023
@coury-clark coury-clark marked this pull request as ready for review February 28, 2023 21:34
@coury-clark

Copy link
Copy Markdown
Contributor Author

@nathan-downs @akalia25 bump!

@coury-clark coury-clark requested review from a team and removed request for a team March 8, 2023 16:38
Comment thread cmd/frontend/internal/app/updatecheck/client.go Outdated
Comment thread cmd/frontend/internal/app/updatecheck/client.go Outdated
Comment thread cmd/frontend/internal/app/updatecheck/handler.go Outdated
Comment thread internal/usagestats/repositories.go Outdated
coury-clark and others added 2 commits March 8, 2023 10:06
@coury-clark coury-clark merged commit aca0b6f into main Mar 8, 2023
@coury-clark coury-clark deleted the cclark/bucket-repo-size-ping branch March 8, 2023 17:31
coury-clark added a commit that referenced this pull request Mar 8, 2023
coury-clark referenced this pull request Mar 8, 2023
Whoops, I forgot this needs the analytics change first

Reverts sourcegraph/sourcegraph#48211

## Test Plan
N/A
@coury-clark coury-clark restored the cclark/bucket-repo-size-ping branch March 8, 2023 18:24
coury-clark referenced this pull request Mar 9, 2023
Revert the revert to restore the PR! 🎪 

Don't merge until analytics team has merged
https://github.com/sourcegraph/analytics/pull/826

Reverts sourcegraph/sourcegraph#48211

## Test Plan 
see https://github.com/sourcegraph/sourcegraph/pull/48211
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants