Skip to content
This repository was archived by the owner on Aug 30, 2022. It is now read-only.

Commit a902570

Browse files
author
Isaac Hier
committed
Formatting changes
Signed-off-by: Isaac Hier <ihier@uber.com>
1 parent 9c8398a commit a902570

File tree

6 files changed

+42
-55
lines changed

6 files changed

+42
-55
lines changed

src/jaegertracing/SpanTest.cpp

+8-9
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,14 @@ namespace jaegertracing {
2222

2323
TEST(Span, testThriftConversion)
2424
{
25-
const Span span(
26-
std::weak_ptr<Tracer>(),
27-
SpanContext(),
28-
"",
29-
Span::Clock::now(),
30-
Span::Clock::duration(),
31-
std::vector<Tag>(),
32-
std::vector<Reference>(),
33-
false);
25+
const Span span(std::weak_ptr<Tracer>(),
26+
SpanContext(),
27+
"",
28+
Span::Clock::now(),
29+
Span::Clock::duration(),
30+
std::vector<Tag>(),
31+
std::vector<Reference>(),
32+
false);
3433
ASSERT_NO_THROW(span.thrift());
3534
}
3635

src/jaegertracing/metrics/InMemoryStatsReporter.h

+11-14
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,17 @@ class InMemoryStatsReporter : public StatsReporter {
3535

3636
virtual ~InMemoryStatsReporter() = default;
3737

38-
void incCounter(
39-
const std::string& name,
40-
int64_t delta,
41-
const TagMap& tags) override;
42-
43-
void recordTimer(
44-
const std::string& name,
45-
int64_t time,
46-
const TagMap& tags) override;
47-
48-
void updateGauge(
49-
const std::string& name,
50-
int64_t time,
51-
const TagMap& tags) override;
38+
void incCounter(const std::string& name,
39+
int64_t delta,
40+
const TagMap& tags) override;
41+
42+
void recordTimer(const std::string& name,
43+
int64_t time,
44+
const TagMap& tags) override;
45+
46+
void updateGauge(const std::string& name,
47+
int64_t time,
48+
const TagMap& tags) override;
5249

5350
void reset();
5451

src/jaegertracing/metrics/StatsFactory.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ class StatsFactory {
4040

4141
std::unique_ptr<Gauge> createGauge(const std::string& name);
4242

43-
virtual std::unique_ptr<Counter>
44-
createCounter(const std::string& name, const TagMap& tags) = 0;
43+
virtual std::unique_ptr<Counter> createCounter(const std::string& name,
44+
const TagMap& tags) = 0;
4545

46-
virtual std::unique_ptr<Timer>
47-
createTimer(const std::string& name, const TagMap& tags) = 0;
46+
virtual std::unique_ptr<Timer> createTimer(const std::string& name,
47+
const TagMap& tags) = 0;
4848

49-
virtual std::unique_ptr<Gauge>
50-
createGauge(const std::string& name, const TagMap& tags) = 0;
49+
virtual std::unique_ptr<Gauge> createGauge(const std::string& name,
50+
const TagMap& tags) = 0;
5151
};
5252

5353
} // namespace metrics

src/jaegertracing/metrics/StatsReporter.h

+5-10
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,14 @@ class StatsReporter {
4545
}
4646

4747
virtual void
48-
incCounter(const std::string& name,
49-
int64_t delta,
50-
const TagMap& tags) = 0;
48+
incCounter(const std::string& name, int64_t delta, const TagMap& tags) = 0;
5149

5250
virtual void
53-
recordTimer(const std::string& name,
54-
int64_t time,
55-
const TagMap& tags) = 0;
51+
recordTimer(const std::string& name, int64_t time, const TagMap& tags) = 0;
5652

57-
virtual void
58-
updateGauge(const std::string& name,
59-
int64_t amount,
60-
const TagMap& tags) = 0;
53+
virtual void updateGauge(const std::string& name,
54+
int64_t amount,
55+
const TagMap& tags) = 0;
6156
};
6257

6358
} // namespace metrics

src/jaegertracing/testutils/MockAgent.cpp

+7-11
Original file line numberDiff line numberDiff line change
@@ -171,25 +171,21 @@ void MockAgent::serveHTTP(std::promise<void>& started)
171171
const auto responseStr = oss.str();
172172
const auto numWritten = ::write(
173173
clientSocket.handle(), responseStr.c_str(), responseStr.size());
174-
(void) numWritten;
174+
(void)numWritten;
175175
} catch (const net::http::ParseError& ex) {
176176
std::ostringstream oss;
177177
oss << "HTTP/1.1 400 Bad Request\r\n\r\n" << ex.what();
178178
const auto response = oss.str();
179-
const auto numWritten =
180-
::write(clientSocket.handle(),
181-
response.c_str(),
182-
response.size());
183-
(void) numWritten;
179+
const auto numWritten = ::write(
180+
clientSocket.handle(), response.c_str(), response.size());
181+
(void)numWritten;
184182
} catch (const std::exception& ex) {
185183
std::ostringstream oss;
186184
oss << "HTTP/1.1 500 Internal Server Error\r\n\r\n" << ex.what();
187185
const auto response = oss.str();
188-
const auto numWritten =
189-
::write(clientSocket.handle(),
190-
response.c_str(),
191-
response.size());
192-
(void) numWritten;
186+
const auto numWritten = ::write(
187+
clientSocket.handle(), response.c_str(), response.size());
188+
(void)numWritten;
193189
}
194190
}
195191
}

src/jaegertracing/utils/ErrorUtilTest.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,18 @@ TEST(ErrorUtil, test)
5858
logStrNoDate);
5959
} break;
6060
case 1: {
61-
ASSERT_EQ(" [test_logger] [warning] test: Unknown error: -1"
62-
", code=-1\n",
63-
logStrNoDate);
61+
ASSERT_EQ(
62+
" [test_logger] [warning] test: Unknown error: -1"
63+
", code=-1\n",
64+
logStrNoDate);
6465
} break;
6566
case 2: {
6667
ASSERT_EQ(" [test_logger] [warning] test: test, numFailed=5\n",
6768
logStrNoDate);
6869
} break;
6970
default: {
7071
ASSERT_EQ(3, i);
71-
ASSERT_EQ(" [test_logger] [warning] test\n",
72-
logStrNoDate);
72+
ASSERT_EQ(" [test_logger] [warning] test\n", logStrNoDate);
7373
} break;
7474
}
7575
}

0 commit comments

Comments
 (0)