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 helper interface cleanup and dep/header cleanup #527

Merged
merged 48 commits into from
Sep 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
8ea442d
Merge pull request #5 from envoyproxy/master
eric846 Jun 1, 2020
5ac755a
Merge pull request #6 from envoyproxy/master
eric846 Jun 28, 2020
b8c25a5
Merge pull request #7 from envoyproxy/master
eric846 Jul 7, 2020
1c19c68
initial commit
eric846 Jul 9, 2020
7050686
fix comments
eric846 Jul 9, 2020
0776563
fix format
eric846 Jul 9, 2020
16fd8f6
rename adaptive_rps to adaptive_load
eric846 Jul 10, 2020
c383010
add field_selector in example
eric846 Jul 10, 2020
6e1a483
fix example comment
eric846 Jul 10, 2020
4ef1140
fix format
eric846 Jul 10, 2020
4111bf4
add support for fault injection headers
eric846 Jul 10, 2020
871a959
replace linear and binary search with exponential search
eric846 Jul 10, 2020
1fd77c1
add InputVariableSetter mechanism
eric846 Jul 11, 2020
edc36b2
add input variable setter to build file
eric846 Jul 11, 2020
4d0364e
fix syntax errors
eric846 Jul 11, 2020
aed6d94
rename samples/adaptive_rps
eric846 Jul 11, 2020
d9ae87d
improve comments, change step controller initial value from int64 to …
eric846 Jul 12, 2020
a05a6f5
add proto validation rules, fix comments, make rps the default input_…
eric846 Jul 13, 2020
8cd4d21
fix comment wording
eric846 Jul 13, 2020
d814a96
simplify protos, add defaults, specify required or optional
eric846 Jul 14, 2020
5f5a885
add missing newline
eric846 Jul 14, 2020
7e20a78
Kick CI
eric846 Jul 14, 2020
9048267
simplify protos
eric846 Jul 15, 2020
306c0ec
fix format
eric846 Jul 15, 2020
d33f543
fix some optional field comments and rules
eric846 Jul 15, 2020
442cca9
Merge pull request #10 from envoyproxy/master
eric846 Jul 16, 2020
677b783
add Nighthawk status field in BenchmarkResult as nested nighthawk.cli…
eric846 Jul 19, 2020
cefb366
switch to standard Envoy plugin config proto, add prefix to internal …
eric846 Jul 22, 2020
f3684df
Merge remote-tracking branch 'upstream/master' into adaptive-rps-protos2
eric846 Jul 22, 2020
5463051
create headers
eric846 Jul 22, 2020
46e0e25
fix format
eric846 Jul 22, 2020
f634642
use docstring format
eric846 Jul 22, 2020
3c39faa
fix typos in comments
eric846 Jul 23, 2020
b9c8f2b
split build target, get rid of ostream, change InputValueSetter to us…
eric846 Jul 24, 2020
5fc4db4
remove nested namespace, remove redundant _include in target names
eric846 Jul 26, 2020
64e7852
merge from upstream
eric846 Jul 29, 2020
12807f1
Merge remote-tracking branch 'upstream/master' into adaptive-rps-headers
eric846 Jul 29, 2020
e8e960f
merge from upstream
eric846 Aug 27, 2020
6306b4e
Merge remote-tracking branch 'upstream/master' into master2
eric846 Aug 27, 2020
1ece783
Merge remote-tracking branch 'upstream/master' into master2
eric846 Aug 28, 2020
70705e9
Merge remote-tracking branch 'upstream/master' into master2
eric846 Aug 31, 2020
e576bc1
Merge remote-tracking branch 'upstream/master' into master2
eric846 Sep 1, 2020
1fca528
Merge remote-tracking branch 'upstream/master' into master2
eric846 Sep 3, 2020
ed32856
Merge remote-tracking branch 'upstream/master' into master2
eric846 Sep 3, 2020
eecf00d
Merge remote-tracking branch 'upstream/master' into master2
eric846 Sep 8, 2020
13179fb
Merge remote-tracking branch 'upstream/master' into master2
eric846 Sep 10, 2020
3eb89e6
Merge remote-tracking branch 'upstream/master' into master2
eric846 Sep 11, 2020
070c04d
add const to adaptive load helper interface methods, clean up deps an…
eric846 Sep 11, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/nighthawk/adaptive_load/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ envoy_basic_cc_library(
"@envoy//include/envoy/common:base_includes",
"@envoy//include/envoy/common:time_interface",
"@envoy//include/envoy/config:typed_config_interface",
"@envoy//source/common/protobuf:protobuf_with_external_headers",
],
)

Expand Down
3 changes: 2 additions & 1 deletion include/nighthawk/adaptive_load/metrics_evaluator.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#pragma once

#include "envoy/config/core/v3/base.pb.h"

#include "nighthawk/adaptive_load/metrics_plugin.h"

#include "external/envoy/source/common/common/logger.h"
#include "external/envoy/source/common/common/statusor.h"
#include "external/envoy/source/common/protobuf/protobuf.h"

Expand Down
4 changes: 2 additions & 2 deletions include/nighthawk/adaptive_load/session_spec_proto_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class AdaptiveLoadSessionSpecProtoHelper {
* @return Adaptive load session spec with default values inserted.
*/
virtual nighthawk::adaptive_load::AdaptiveLoadSessionSpec
SetSessionSpecDefaults(nighthawk::adaptive_load::AdaptiveLoadSessionSpec spec) PURE;
SetSessionSpecDefaults(nighthawk::adaptive_load::AdaptiveLoadSessionSpec spec) const PURE;

/**
* Checks whether a session spec is valid: No forbidden fields in Nighthawk traffic spec; no bad
Expand All @@ -37,7 +37,7 @@ class AdaptiveLoadSessionSpecProtoHelper {
* @return Status OK if no problems were found, or InvalidArgument with all errors.
*/
virtual absl::Status
CheckSessionSpec(const nighthawk::adaptive_load::AdaptiveLoadSessionSpec& spec) PURE;
CheckSessionSpec(const nighthawk::adaptive_load::AdaptiveLoadSessionSpec& spec) const PURE;
};

} // namespace Nighthawk
4 changes: 2 additions & 2 deletions include/nighthawk/common/nighthawk_service_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace Nighthawk {

/**
* An interface for interacting with a Nighthawk Service gRPC stub.
* An interface for a stateless helper that interacts with a Nighthawk Service gRPC stub.
*/
class NighthawkServiceClient {
public:
Expand All @@ -30,7 +30,7 @@ class NighthawkServiceClient {
*/
virtual absl::StatusOr<nighthawk::client::ExecutionResponse> PerformNighthawkBenchmark(
nighthawk::client::NighthawkService::StubInterface* nighthawk_service_stub,
const nighthawk::client::CommandLineOptions& command_line_options) PURE;
const nighthawk::client::CommandLineOptions& command_line_options) const PURE;
};

} // namespace Nighthawk
4 changes: 2 additions & 2 deletions source/adaptive_load/session_spec_proto_helper_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Nighthawk {

nighthawk::adaptive_load::AdaptiveLoadSessionSpec
AdaptiveLoadSessionSpecProtoHelperImpl::SetSessionSpecDefaults(
nighthawk::adaptive_load::AdaptiveLoadSessionSpec spec) {
nighthawk::adaptive_load::AdaptiveLoadSessionSpec spec) const {
if (!spec.nighthawk_traffic_template().has_open_loop()) {
spec.mutable_nighthawk_traffic_template()->mutable_open_loop()->set_value(true);
}
Expand Down Expand Up @@ -48,7 +48,7 @@ AdaptiveLoadSessionSpecProtoHelperImpl::SetSessionSpecDefaults(
}

absl::Status AdaptiveLoadSessionSpecProtoHelperImpl::CheckSessionSpec(
const nighthawk::adaptive_load::AdaptiveLoadSessionSpec& spec) {
const nighthawk::adaptive_load::AdaptiveLoadSessionSpec& spec) const {
std::vector<std::string> errors;
if (spec.nighthawk_traffic_template().has_duration()) {
errors.emplace_back(
Expand Down
4 changes: 2 additions & 2 deletions source/adaptive_load/session_spec_proto_helper_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ namespace Nighthawk {
class AdaptiveLoadSessionSpecProtoHelperImpl : public AdaptiveLoadSessionSpecProtoHelper {
public:
nighthawk::adaptive_load::AdaptiveLoadSessionSpec
SetSessionSpecDefaults(nighthawk::adaptive_load::AdaptiveLoadSessionSpec spec) override;
SetSessionSpecDefaults(nighthawk::adaptive_load::AdaptiveLoadSessionSpec spec) const override;

absl::Status
CheckSessionSpec(const nighthawk::adaptive_load::AdaptiveLoadSessionSpec& spec) override;
CheckSessionSpec(const nighthawk::adaptive_load::AdaptiveLoadSessionSpec& spec) const override;
};

} // namespace Nighthawk
2 changes: 1 addition & 1 deletion source/common/nighthawk_service_client_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Nighthawk {
absl::StatusOr<nighthawk::client::ExecutionResponse>
NighthawkServiceClientImpl::PerformNighthawkBenchmark(
nighthawk::client::NighthawkService::StubInterface* nighthawk_service_stub,
const nighthawk::client::CommandLineOptions& command_line_options) {
const nighthawk::client::CommandLineOptions& command_line_options) const {
nighthawk::client::ExecutionRequest request;
nighthawk::client::ExecutionResponse response;
*request.mutable_start_request()->mutable_options() = command_line_options;
Expand Down
2 changes: 1 addition & 1 deletion source/common/nighthawk_service_client_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class NighthawkServiceClientImpl : public NighthawkServiceClient {
public:
absl::StatusOr<nighthawk::client::ExecutionResponse> PerformNighthawkBenchmark(
nighthawk::client::NighthawkService::StubInterface* nighthawk_service_stub,
const nighthawk::client::CommandLineOptions& command_line_options) override;
const nighthawk::client::CommandLineOptions& command_line_options) const override;
};

} // namespace Nighthawk