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

Adaptive Load command line client #616

Merged
merged 79 commits into from
Feb 11, 2021
Merged

Conversation

eric846
Copy link
Contributor

@eric846 eric846 commented Feb 3, 2021

An adaptive load command line executable that drives a Nighthawk Service with a series of benchmarks, varying the RPS or another input variable dynamically.

bazel build -c opt :nighthawk

bazel-bin/nighthawk_adaptive_load_client

  • --spec-file pathname
    • Pathname of an AdaptiveLoadSessionSpec textproto defining the session
    • Required
    • Example:test/adaptive_load/test_data/valid_session_spec.textproto
  • --output-file pathname
    • Pathname to write the AdaptiveLoadSessionOutput textproto session output
    • Required
  • --nighthawk-service-address host:port
    • Address of the Nighthawk Service to be driven by the adaptive load controller over gRPC
    • Default localhost:8443
  • --use-tls
    • Use TLS for the gRPC connection when sending commands to the Nighthawk Service
    • Default false (insecure connection)

Note that to run an adaptive load session, you must also have a Nighthawk Service running, e.g.:
bazel-bin/nighthawk_service & (to run at localhost:8443)

Part of #416.

eric846 added 30 commits June 1, 2020 17:23
Signed-off-by: eric846 <[email protected]>
Signed-off-by: eric846 <[email protected]>
Signed-off-by: eric846 <[email protected]>
Signed-off-by: eric846 <[email protected]>
Signed-off-by: eric846 <[email protected]>
Signed-off-by: eric846 <[email protected]>
Signed-off-by: eric846 <[email protected]>
Signed-off-by: eric846 <[email protected]>
Signed-off-by: eric846 <[email protected]>
Signed-off-by: eric846 <[email protected]>
Signed-off-by: eric846 <[email protected]>
…ent.Output turns out not to include the status

Signed-off-by: eric846 <[email protected]>
…plugin names, log thresholds only once per session

Signed-off-by: eric846 <[email protected]>
Signed-off-by: eric846 <[email protected]>
@eric846
Copy link
Contributor Author

eric846 commented Feb 4, 2021

/retest

@repokitteh-read-only
Copy link

🔨 rebuilding ci/circleci: docker (failed build)
🔨 rebuilding ci/circleci: integration_test_coverage (failed build)

🐱

Caused by: a #616 (comment) was created by @eric846.

see: more, trace.

@eric846 eric846 marked this pull request as ready for review February 5, 2021 17:27
@eric846 eric846 added the waiting-for-review A PR waiting for a review. label Feb 5, 2021
@dubious90 dubious90 assigned wjuan-AFK and unassigned wjuan-AFK Feb 5, 2021
@dubious90 dubious90 requested a review from wjuan-AFK February 5, 2021 19:06
@dubious90
Copy link
Contributor

@wjuan-AFK Please review and assign to me when done. Also note that we believe the CI failure to be unrelated to these changes.

@oschaaf
Copy link
Member

oschaaf commented Feb 5, 2021

@wjuan-AFK Please review and assign to me when done. Also note that we believe the CI failure to be unrelated to these changes.

@dubious90 Created #620 to address the ci trouble with respect to docker.

* writes the output proto to a file. File paths are taken from class members initialized in the
* constructor.
*
* @return Exit code for this process.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we state that 0 is good or is that implicit?

Copy link
Contributor

Choose a reason for hiding this comment

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

This is a standard in linux, so we can rely on that understanding. https://linuxize.com/post/bash-exit/#exit-status

}
const Envoy::Api::IoCallSizeResult write_result = file->write(contents);
if (!write_result.ok()) {
throw Nighthawk::NighthawkException(absl::StrCat("Unable to write output file \"", path,
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: write to output file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor

@wjuan-AFK wjuan-AFK left a comment

Choose a reason for hiding this comment

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

LGTM

dubious90
dubious90 previously approved these changes Feb 11, 2021
output_filename_ = output_filename.getValue();
}

uint32_t AdaptiveLoadClientMain::Run() {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we file a future bug to enable some dependency injection of the channel here? in the future, people might want to enable other ways of connecting to the nighthawk service besides the two provided here. but we don't need to prematurely allow for that case until we have a specific usecase.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Filed #626.

* writes the output proto to a file. File paths are taken from class members initialized in the
* constructor.
*
* @return Exit code for this process.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a standard in linux, so we can rely on that understanding. https://linuxize.com/post/bash-exit/#exit-status

@eric846
Copy link
Contributor Author

eric846 commented Feb 11, 2021

/retest

@repokitteh-read-only
Copy link

🔨 rebuilding ci/circleci: integration_test_coverage (failed build)
🔨 rebuilding ci/circleci: tsan (failed build)

🐱

Caused by: a #616 (comment) was created by @eric846.

see: more, trace.

@dubious90 dubious90 merged commit ff42695 into envoyproxy:main Feb 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-for-review A PR waiting for a review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants