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

Fix bugprone-unused-return-value clang-tidy warning #6934

Merged
merged 3 commits into from
Jun 8, 2024

Conversation

SiarheiFedartsou
Copy link
Member

@SiarheiFedartsou SiarheiFedartsou commented Jun 8, 2024

Benchmark Results

Benchmark Base PR
alias aliased u32: 1101.37
plain u32: 1095.27
aliased double: 968.342
plain double: 985.91
aliased u32: 1220.84
plain u32: 1166.74
aliased double: 1132.6
plain double: 1003.04
e2e_match_ch requests: 374
failures: 0
req/s: 6.234req/s
avg: 5.529ms
50%: 3ms
75%: 4ms
95%: 18ms
98%: 33ms
99%: 70ms
min: 1.501ms
max: 96.334ms
requests: 359
failures: 0
req/s: 5.991req/s
avg: 5.353ms
50%: 3ms
75%: 4ms
95%: 19ms
98%: 33ms
99%: 53ms
min: 1.147ms
max: 106.222ms
e2e_match_mld requests: 365
failures: 0
req/s: 6.084req/s
avg: 4.503ms
50%: 3ms
75%: 4ms
95%: 10ms
98%: 20ms
99%: 40ms
min: 1.225ms
max: 48.058ms
requests: 396
failures: 0
req/s: 6.609req/s
avg: 4.700ms
50%: 3ms
75%: 4ms
95%: 10ms
98%: 32ms
99%: 58ms
min: 1.294ms
max: 100.437ms
e2e_nearest_ch requests: 414
failures: 0
req/s: 6.900req/s
avg: 1.644ms
50%: 2ms
75%: 2ms
95%: 2ms
98%: 2ms
99%: 2ms
min: 1.199ms
max: 4.045ms
requests: 413
failures: 0
req/s: 6.892req/s
avg: 1.588ms
50%: 2ms
75%: 2ms
95%: 2ms
98%: 2ms
99%: 2ms
min: 1.035ms
max: 3.469ms
e2e_nearest_mld requests: 444
failures: 0
req/s: 7.401req/s
avg: 1.675ms
50%: 2ms
75%: 2ms
95%: 2ms
98%: 3ms
99%: 3ms
min: 1.140ms
max: 7.449ms
requests: 405
failures: 0
req/s: 6.759req/s
avg: 1.601ms
50%: 2ms
75%: 2ms
95%: 2ms
98%: 2ms
99%: 2ms
min: 1.069ms
max: 5.575ms
e2e_route_ch requests: 409
failures: 0
req/s: 6.817req/s
avg: 4.124ms
50%: 4ms
75%: 5ms
95%: 6ms
98%: 7ms
99%: 9ms
min: 1.521ms
max: 10.102ms
requests: 410
failures: 0
req/s: 6.842req/s
avg: 4.176ms
50%: 4ms
75%: 5ms
95%: 6ms
98%: 8ms
99%: 9ms
min: 1.366ms
max: 10.710ms
e2e_route_mld requests: 400
failures: 0
req/s: 6.668req/s
avg: 4.646ms
50%: 5ms
75%: 5ms
95%: 7ms
98%: 8ms
99%: 10ms
min: 1.496ms
max: 10.717ms
requests: 412
failures: 0
req/s: 6.876req/s
avg: 4.188ms
50%: 4ms
75%: 5ms
95%: 6ms
98%: 7ms
99%: 10ms
min: 1.529ms
max: 11.369ms
e2e_table_ch requests: 365
failures: 0
req/s: 6.084req/s
avg: 38.616ms
50%: 26ms
75%: 47ms
95%: 120ms
98%: 130ms
99%: 140ms
min: 2.614ms
max: 146.388ms
requests: 391
failures: 0
req/s: 6.525req/s
avg: 45.511ms
50%: 29ms
75%: 76ms
95%: 130ms
98%: 140ms
99%: 140ms
min: 2.458ms
max: 160.769ms
e2e_table_mld requests: 369
failures: 0
req/s: 6.151req/s
avg: 75.592ms
50%: 73ms
75%: 110ms
95%: 140ms
98%: 150ms
99%: 160ms
min: 4.671ms
max: 171.151ms
requests: 384
failures: 0
req/s: 6.409req/s
avg: 52.338ms
50%: 35ms
75%: 83ms
95%: 130ms
98%: 140ms
99%: 140ms
min: 2.491ms
max: 362.127ms
e2e_trip_ch requests: 384
failures: 0
req/s: 6.400req/s
avg: 15.739ms
50%: 14ms
75%: 20ms
95%: 30ms
98%: 33ms
99%: 35ms
min: 2.164ms
max: 42.537ms
requests: 365
failures: 0
req/s: 6.091req/s
avg: 16.294ms
50%: 15ms
75%: 21ms
95%: 31ms
98%: 35ms
99%: 35ms
min: 2.587ms
max: 39.104ms
e2e_trip_mld requests: 345
failures: 0
req/s: 5.751req/s
avg: 21.842ms
50%: 22ms
75%: 28ms
95%: 34ms
98%: 38ms
99%: 41ms
min: 4.124ms
max: 49.008ms
requests: 342
failures: 0
req/s: 5.708req/s
avg: 17.987ms
50%: 17ms
75%: 24ms
95%: 33ms
98%: 36ms
99%: 39ms
min: 1.804ms
max: 44.905ms
json-render String: 6.64187ms
Stringstream: 9.32875ms
Vector: 6.89803ms
String: 6.62568ms
Stringstream: 9.35627ms
Vector: 6.92196ms
match_ch Default radius:
4.40558ms/req at 82 coordinate
0.0537266ms/coordinate
Radius 5m:
4.39923ms/req at 82 coordinate
0.0536492ms/coordinate
Radius 10m:
15.0154ms/req at 82 coordinate
0.183114ms/coordinate
Radius 15m:
36.7744ms/req at 82 coordinate
0.448469ms/coordinate
Radius 30m:
312.746ms/req at 82 coordinate
3.81398ms/coordinate
Default radius:
4.41805ms/req at 82 coordinate
0.0538787ms/coordinate
Radius 5m:
4.38767ms/req at 82 coordinate
0.0535082ms/coordinate
Radius 10m:
15.0246ms/req at 82 coordinate
0.183227ms/coordinate
Radius 15m:
36.6784ms/req at 82 coordinate
0.447298ms/coordinate
Radius 30m:
312.73ms/req at 82 coordinate
3.81378ms/coordinate
match_mld Default radius:
2.79074ms/req at 82 coordinate
0.0340334ms/coordinate
Radius 5m:
2.80465ms/req at 82 coordinate
0.0342031ms/coordinate
Radius 10m:
10.1242ms/req at 82 coordinate
0.123466ms/coordinate
Radius 15m:
25.9493ms/req at 82 coordinate
0.316455ms/coordinate
Radius 30m:
304.064ms/req at 82 coordinate
3.70809ms/coordinate
Default radius:
2.76857ms/req at 82 coordinate
0.0337631ms/coordinate
Radius 5m:
2.75576ms/req at 82 coordinate
0.0336068ms/coordinate
Radius 10m:
10.1434ms/req at 82 coordinate
0.1237ms/coordinate
Radius 15m:
25.9579ms/req at 82 coordinate
0.31656ms/coordinate
Radius 30m:
303.413ms/req at 82 coordinate
3.70016ms/coordinate
osrm_contract Time: 96.00s Peak RAM: 185.49MB Time: 96.01s Peak RAM: 185.61MB
osrm_customize Time: 1.31s Peak RAM: 115.05MB Time: 1.31s Peak RAM: 115.10MB
osrm_extract Time: 12.35s Peak RAM: 412.14MB Time: 12.41s Peak RAM: 409.42MB
osrm_partition Time: 2.27s Peak RAM: 150.51MB Time: 2.33s Peak RAM: 148.41MB
packedvector random write:
std::vector 9873.75 ms
util::packed_vector 74900.2 ms
slowdown: 7.58579
random read:
std::vector 8557.87 ms
util::packed_vector 30682.3 ms
slowdown: 3.58527
random write:
std::vector 10937.2 ms
util::packed_vector 74663.4 ms
slowdown: 6.82656
random read:
std::vector 9009.73 ms
util::packed_vector 30940.3 ms
slowdown: 3.4341
route_ch 1000 routes, 3 coordinates, no alternatives, overview=full, steps=true
513.002ms
0.513002ms/req
1000 routes, 2 coordinates, no alternatives, overview=full, steps=true
353.934ms
0.353934ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=full, steps=true
630.357ms
0.630357ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false
151.311ms
0.151311ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false
97.5076ms
0.0975076ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false
132.297ms
0.132297ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false, radius=750
150.692ms
0.150692ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false, radius=750
97.1382ms
0.0971382ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false, radius=750
133.127ms
0.133127ms/req
1000 routes, 3 coordinates, no alternatives, overview=full, steps=true
512.267ms
0.512267ms/req
1000 routes, 2 coordinates, no alternatives, overview=full, steps=true
353.505ms
0.353505ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=full, steps=true
645.919ms
0.645919ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false
150.704ms
0.150704ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false
97.761ms
0.097761ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false
132.082ms
0.132082ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false, radius=750
151.081ms
0.151081ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false, radius=750
97.4242ms
0.0974242ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false, radius=750
132.53ms
0.13253ms/req
route_mld 1000 routes, 3 coordinates, no alternatives, overview=full, steps=true
644.141ms
0.644141ms/req
1000 routes, 2 coordinates, no alternatives, overview=full, steps=true
442.442ms
0.442442ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=full, steps=true
815.308ms
0.815308ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false
270.488ms
0.270488ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false
164.212ms
0.164212ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false
288.699ms
0.288699ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false, radius=750
260.024ms
0.260024ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false, radius=750
162.393ms
0.162393ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false, radius=750
285.866ms
0.285866ms/req
1000 routes, 3 coordinates, no alternatives, overview=full, steps=true
642.001ms
0.642001ms/req
1000 routes, 2 coordinates, no alternatives, overview=full, steps=true
442.046ms
0.442046ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=full, steps=true
811.902ms
0.811902ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false
266.708ms
0.266708ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false
162.038ms
0.162038ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false
290.747ms
0.290747ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false, radius=750
257.978ms
0.257978ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false, radius=750
159.88ms
0.15988ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false, radius=750
287.324ms
0.287324ms/req
rtree 1 result:
207.193ms -> 0.0207193 ms/query
10 results:
242.442ms -> 0.0242442 ms/query
1 result:
206.727ms -> 0.0206727 ms/query
10 results:
241.925ms -> 0.0241925 ms/query

@SiarheiFedartsou SiarheiFedartsou force-pushed the sf-bugprone-unused-return-value branch from dad21a8 to b2d967a Compare June 8, 2024 08:37
@@ -186,6 +186,7 @@ void Connection::handle_timeout(boost::system::error_code ec)
if (ec != boost::asio::error::operation_aborted)
{
boost::system::error_code ignore_error;
// NOLINTNEXTLINE(bugprone-unused-return-value)
TCP_socket.cancel(ignore_error);
Copy link
Member Author

Choose a reason for hiding this comment

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

As I understand Boost deprecated return value in both these cases (it used to return error in the past), so it is safe to ignore it.

@SiarheiFedartsou SiarheiFedartsou marked this pull request as ready for review June 8, 2024 09:20
@SiarheiFedartsou SiarheiFedartsou mentioned this pull request Jun 8, 2024
13 tasks
@SiarheiFedartsou SiarheiFedartsou merged commit 99cb17a into master Jun 8, 2024
19 of 21 checks passed
@SiarheiFedartsou SiarheiFedartsou deleted the sf-bugprone-unused-return-value branch June 8, 2024 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants