This repository was archived by the owner on Aug 30, 2022. It is now read-only.
File tree 6 files changed +42
-55
lines changed
6 files changed +42
-55
lines changed Original file line number Diff line number Diff line change @@ -22,15 +22,14 @@ namespace jaegertracing {
22
22
23
23
TEST (Span, testThriftConversion)
24
24
{
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 );
34
33
ASSERT_NO_THROW (span.thrift ());
35
34
}
36
35
Original file line number Diff line number Diff line change @@ -35,20 +35,17 @@ class InMemoryStatsReporter : public StatsReporter {
35
35
36
36
virtual ~InMemoryStatsReporter () = default ;
37
37
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 ;
52
49
53
50
void reset ();
54
51
Original file line number Diff line number Diff line change @@ -40,14 +40,14 @@ class StatsFactory {
40
40
41
41
std::unique_ptr<Gauge> createGauge (const std::string& name);
42
42
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;
45
45
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;
48
48
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;
51
51
};
52
52
53
53
} // namespace metrics
Original file line number Diff line number Diff line change @@ -45,19 +45,14 @@ class StatsReporter {
45
45
}
46
46
47
47
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 ;
51
49
52
50
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 ;
56
52
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;
61
56
};
62
57
63
58
} // namespace metrics
Original file line number Diff line number Diff line change @@ -171,25 +171,21 @@ void MockAgent::serveHTTP(std::promise<void>& started)
171
171
const auto responseStr = oss.str ();
172
172
const auto numWritten = ::write (
173
173
clientSocket.handle (), responseStr.c_str (), responseStr.size ());
174
- (void ) numWritten;
174
+ (void )numWritten;
175
175
} catch (const net::http::ParseError& ex) {
176
176
std::ostringstream oss;
177
177
oss << " HTTP/1.1 400 Bad Request\r\n\r\n " << ex.what ();
178
178
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;
184
182
} catch (const std::exception & ex) {
185
183
std::ostringstream oss;
186
184
oss << " HTTP/1.1 500 Internal Server Error\r\n\r\n " << ex.what ();
187
185
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;
193
189
}
194
190
}
195
191
}
Original file line number Diff line number Diff line change @@ -58,18 +58,18 @@ TEST(ErrorUtil, test)
58
58
logStrNoDate);
59
59
} break ;
60
60
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);
64
65
} break ;
65
66
case 2 : {
66
67
ASSERT_EQ (" [test_logger] [warning] test: test, numFailed=5\n " ,
67
68
logStrNoDate);
68
69
} break ;
69
70
default : {
70
71
ASSERT_EQ (3 , i);
71
- ASSERT_EQ (" [test_logger] [warning] test\n " ,
72
- logStrNoDate);
72
+ ASSERT_EQ (" [test_logger] [warning] test\n " , logStrNoDate);
73
73
} break ;
74
74
}
75
75
}
You can’t perform that action at this time.
0 commit comments