Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
Signed-off-by: Tony Allen <[email protected]>
  • Loading branch information
tonya11en committed Aug 3, 2019
1 parent 0aa3576 commit a694091
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ AdaptiveConcurrencyFilter::AdaptiveConcurrencyFilter(

AdaptiveConcurrencyFilter::~AdaptiveConcurrencyFilter() {}

Http::FilterHeadersStatus AdaptiveConcurrencyFilter::decodeHeaders(Http::HeaderMap&, bool end_stream) {
Http::FilterHeadersStatus AdaptiveConcurrencyFilter::decodeHeaders(Http::HeaderMap&,
bool end_stream) {
if (!end_stream) {
return Http::FilterHeadersStatus::Continue;
}
Expand All @@ -36,9 +37,8 @@ Http::FilterHeadersStatus AdaptiveConcurrencyFilter::decodeHeaders(Http::HeaderM
}

// TODO (tonya11en): Remove filler words.
decoder_callbacks_->sendLocalReply(
Http::Code::ServiceUnavailable, "filler words", nullptr,
absl::nullopt, "more filler words");
decoder_callbacks_->sendLocalReply(Http::Code::ServiceUnavailable, "filler words", nullptr,
absl::nullopt, "more filler words");
return Http::FilterHeadersStatus::StopIteration;
}

Expand All @@ -49,7 +49,8 @@ void AdaptiveConcurrencyFilter::onDestroy() {
Http::FilterHeadersStatus AdaptiveConcurrencyFilter::encodeHeaders(Http::HeaderMap&,
bool end_stream) {
if (end_stream) {
const std::chrono::nanoseconds rq_latency = config_->timeSource().monotonicTime() - rq_start_time_;
const std::chrono::nanoseconds rq_latency =
config_->timeSource().monotonicTime() - rq_start_time_;
controller_->recordLatencySample(rq_latency);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
#include <unordered_set>
#include <vector>

#include "envoy/common/time.h"
#include "envoy/config/filter/http/adaptive_concurrency/v2alpha/adaptive_concurrency.pb.h"
#include "envoy/http/filter.h"
#include "envoy/runtime/runtime.h"
#include "envoy/stats/scope.h"
#include "envoy/common/time.h"
#include "envoy/stats/stats_macros.h"

#include "envoy/config/filter/http/adaptive_concurrency/v2alpha/adaptive_concurrency.pb.h"
#include "extensions/filters/http/adaptive_concurrency/concurrency_controller/concurrency_controller.h"

namespace Envoy {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ Http::FilterFactoryCb AdaptiveConcurrencyFilterFactory::createFilterFactoryFromP

// TODO (tonya11en): Noop controller needs to be replaced with an actual
// implementation in a future patch.
auto noop_ctl = std::make_shared<ConcurrencyController::NoopController>();
std::shared_ptr<ConcurrencyController::ConcurrencyController> noop_ctl =
std::make_shared<ConcurrencyController::NoopController>();

AdaptiveConcurrencyFilterConfigSharedPtr filter_config(new AdaptiveConcurrencyFilterConfig(
config, context.runtime(), stats_prefix, context.scope(), context.timeSource()));
Expand Down

0 comments on commit a694091

Please sign in to comment.