Skip to content

memory: use EXPECT_LE to measure memory consumption to allow for differing versions of STL etc#7208

Merged
lizan merged 7 commits intoenvoyproxy:masterfrom
jmarantz:discover-stl-version
Jun 8, 2019
Merged

memory: use EXPECT_LE to measure memory consumption to allow for differing versions of STL etc#7208
lizan merged 7 commits intoenvoyproxy:masterfrom
jmarantz:discover-stl-version

Conversation

@jmarantz
Copy link
Copy Markdown
Contributor

@jmarantz jmarantz commented Jun 7, 2019

Description: It appears that CI (Bazel & Envoy projects) has diverged in its memory behavior from our development environment behavior, so we need to rely on EXPECT_LE rather than EXPECT_EQ for tracking memory usage. Otherwise we inherit a boatload of maintenance and determinism hassle trying to keep CI and dev builds working.
Risk Level: low
Testing: //test/... finished (default build). --config libc++ running now in parallel.
Docs Changes: n/a
Release Notes: n/a
Fixes: #7196

jmarantz added 3 commits June 7, 2019 14:02
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Copy link
Copy Markdown
Member

@cmluciano cmluciano left a comment

Choose a reason for hiding this comment

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

The CI errors are related to failed pulls of nodejs deps.

bazel test //test/common/stats:symbol_table_impl_test & bazel test //test/integration:stats_integration_test are passing locally for me with clang-8 & bazel 0.27.0rc3

jmarantz added 2 commits June 7, 2019 15:08
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
@jmarantz jmarantz marked this pull request as ready for review June 7, 2019 19:28
htuch
htuch previously approved these changes Jun 7, 2019
Copy link
Copy Markdown
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

Thanks!

@philwo
Copy link
Copy Markdown

philwo commented Jun 7, 2019

I triggered a build on Bazel CI for your PR and it's green again! 😃

Here are the results: https://buildkite.com/bazel/envoy/builds/414

(Ignore the last failing step regarding "Try Update Last Green Commit" - that's because I manually triggered it and your commit isn't merged yet.)

// 2019/06/06 7208 49419 make memory targets approximate

EXPECT_EQ(m_per_cluster, 49393);
EXPECT_LE(m_per_cluster, 49449);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We will miss some regression on this since PRs saving memory likely won't update the value here. I don't really have idea to make this better while make it robust. Shall we do some exact match when it is running in our CI image only?

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.

Sure but I think that can be a follow-up. Maybe we could have a test-helper method that took the exact number we scrape from CI, but did an inexact comparison when not running in CI.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

SGTM, can you file an issue?

@lizan
Copy link
Copy Markdown
Member

lizan commented Jun 7, 2019

hmm, the magic number fails on macOS too @jmarantz

test/integration/stats_integration_test.cc:219
Expected: (m_per_cluster) <= (49449), actual: 49547 vs 49449

jmarantz added 2 commits June 7, 2019 20:39
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
@jmarantz
Copy link
Copy Markdown
Contributor Author

jmarantz commented Jun 8, 2019

/retest

@repokitteh-read-only
Copy link
Copy Markdown

🔨 rebuilding ci/circleci: compile_time_options (failed build)

🐱

Caused by: a #7208 (comment) was created by @jmarantz.

see: more, trace.

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.

stats_integration_test failing on Bazel CI

5 participants