Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contrib/google.golang.org/api: change gen_endpoints script to generate a json file #2009

Merged
merged 2 commits into from
May 30, 2023

Conversation

rarguelloF
Copy link
Contributor

@rarguelloF rarguelloF commented May 29, 2023

What does this PR do?

contrib/google.golang.org/api: change gen_endpoints script to generate a json file instead of a Go file.

Motivation

Improve memory footprint of the package and fix CI issues for the CI job Testing outlier google.golang.org/api like this:

Run go get google.golang.org/api@v0.121.0 # version used to generate code
Error: Process completed with exit code 143.

Running go test -v -toolexec '/usr/bin/time -l' ./contrib/google.golang.org/api/...

Before PR (650MB):

# gopkg.in/DataDog/dd-trace-go.v1/contrib/google.golang.org/api [gopkg.in/DataDog/dd-trace-go.v1/contrib/google.golang.org/api.test]
        2.25 real         2.46 user         0.15 sys
           662470656  maximum resident set size
                   0  average shared memory size
                   0  average unshared data size
                   0  average unshared stack size
               40668  page reclaims
                  21  page faults
                   0  swaps
                   0  block input operations
                   0  block output operations
                   0  messages sent
                   0  messages received
                 289  signals received
                  47  voluntary context switches
                3171  involuntary context switches
         35238301384  instructions retired
          7896108868  cycles elapsed
           651397376  peak memory footprint

After PR (3.2GB):

# gopkg.in/DataDog/dd-trace-go.v1/contrib/google.golang.org/api [gopkg.in/DataDog/dd-trace-go.v1/contrib/google.golang.org/api.test]
       14.01 real        15.01 user         0.59 sys
          3266461696  maximum resident set size
                   0  average shared memory size
                   0  average unshared data size
                   0  average unshared stack size
              199696  page reclaims
                   0  page faults
                   0  swaps
                   0  block input operations
                   0  block output operations
                   0  messages sent
                   0  messages received
                1837  signals received
                 173  voluntary context switches
               11076  involuntary context switches
        233336926892  instructions retired
         48981875346  cycles elapsed
          3255491712  peak memory footprint # 3,2GB

With this PR (81MB):

# gopkg.in/DataDog/dd-trace-go.v1/contrib/google.golang.org/api.test
        0.74 real         0.38 user         0.08 sys
           277987328  maximum resident set size
                   0  average shared memory size
                   0  average unshared data size
                   0  average unshared stack size
               10959  page reclaims
                7571  page faults
                   0  swaps
                   0  block input operations
                   0  block output operations
                   0  messages sent
                   0  messages received
                 114  signals received
                 256  voluntary context switches
                4573  involuntary context switches
          4873847759  instructions retired
          1476368924  cycles elapsed
            81659328  peak memory footprint

Describe how to test/QA your changes

Reviewer's Checklist

  • Changed code has unit tests for its functionality.
  • If this interacts with the agent in a new way, a system test has been added.

@pr-commenter
Copy link

pr-commenter bot commented May 29, 2023

Benchmarks

Comparing candidate commit d92356d in PR branch rarguelloF/improve-memory-contrib-google-api with baseline commit fbd37ea in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 24 metrics, 0 unstable metrics.

@rarguelloF rarguelloF marked this pull request as ready for review May 30, 2023 09:01
@rarguelloF rarguelloF requested a review from a team May 30, 2023 09:01
@rarguelloF rarguelloF merged commit 948397b into main May 30, 2023
48 checks passed
@rarguelloF rarguelloF deleted the rarguelloF/improve-memory-contrib-google-api branch May 30, 2023 09:21
katiehockman pushed a commit that referenced this pull request Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants