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

pass in previous revision when fetching recent commits to reduce impa…#45683

Merged
coury-clark merged 4 commits into
cclark/gitserver-compressionfrom
cclark/gitserver-compression-singlepass
Dec 15, 2022
Merged

pass in previous revision when fetching recent commits to reduce impa…#45683
coury-clark merged 4 commits into
cclark/gitserver-compressionfrom
cclark/gitserver-compression-singlepass

Conversation

@coury-clark

@coury-clark coury-clark commented Dec 15, 2022

Copy link
Copy Markdown
Contributor

Merging changes for reduced git log load into compression branch.

Test plan

See this
I also generated the same compressed test plan in the parent PR and got the same results.

{"plan": {
  "Executions": [
    {
      "Revision": "72917a1559e17f38638ade54020ab372ba848d67",
      "RecordingTime": "2020-03-14T23:22:00Z",
      "SharedRecordings": null
    },
    {
      "Revision": "2004d9dba6b07a5b8d133209244f376680f9d472",
      "RecordingTime": "2020-06-14T23:22:00Z",
      "SharedRecordings": null
    },
    {
      "Revision": "0d28cf682dbe774898e42a3db11b7ce24b36751a",
      "RecordingTime": "2020-09-14T23:22:00Z",
      "SharedRecordings": null
    },
    {
      "Revision": "d51a2315c1223966f20802b44e436a5bcb9b6db2",
      "RecordingTime": "2020-12-14T23:22:00Z",
      "SharedRecordings": null
    },
    {
      "Revision": "9974e9ec57696378079ecc3accd3d6f29401b3a0",
      "RecordingTime": "2021-03-14T23:22:00Z",
      "SharedRecordings": [
        "2021-06-14T23:22:00Z",
        "2021-09-14T23:22:00Z",
        "2021-12-14T23:22:00Z",
        "2022-03-14T23:22:00Z",
        "2022-06-14T23:22:00Z",
        "2022-09-14T23:22:00Z",
        "2022-12-14T23:22:00Z"
      ]
    }
  ],
  "RecordCount": 5
}
}

@cla-bot cla-bot Bot added the cla-signed label Dec 15, 2022
@coury-clark coury-clark requested a review from a team December 15, 2022 00:02
@sourcegraph-bot

sourcegraph-bot commented Dec 15, 2022

Copy link
Copy Markdown
Contributor

Codenotify: Notifying subscribers in CODENOTIFY files for diff 5f86043...96dafa9.

Notify File(s)
@sourcegraph/code-insights-backend enterprise/internal/insights/background/background.go
enterprise/internal/insights/background/historical_enqueuer.go
enterprise/internal/insights/compression/compression.go
enterprise/internal/insights/compression/compression_test.go
enterprise/internal/insights/discovery/git_commits.go
enterprise/internal/insights/pipeline/backfill.go
enterprise/internal/insights/pipeline/backfill_test.go

commits, err := g.commitFetcher.RecentCommits(ctx, name, to)
getCommit := func(to time.Time, prev string) (*gitdomain.Commit, bool, error) {
start := time.Now()
commits, err := g.commitFetcher.RecentCommits(ctx, name, to, prev)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we already capture this entire stage in a REDMetric, so not going to duplicate that.

Comment thread enterprise/internal/insights/compression/compression.go Outdated
coury-clark and others added 2 commits December 15, 2022 08:21
@coury-clark coury-clark merged commit 2760844 into cclark/gitserver-compression Dec 15, 2022
@coury-clark coury-clark deleted the cclark/gitserver-compression-singlepass branch December 15, 2022 15:36
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.

4 participants