GCC Code Coverage Report


Directory: libs/http_proto/
File: src/sink.cpp
Date: 2025-10-12 23:51:57
Exec Total Coverage
Lines: 12 13 92.3%
Functions: 1 1 100.0%
Branches: 10 12 83.3%

Line Branch Exec Source
1 //
2 // Copyright (c) 2023 Vinnie Falco (vinnie.falco@gmail.com)
3 //
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 //
7 // Official repository: https://github.com/cppalliance/http_proto
8 //
9
10 #include <boost/http_proto/sink.hpp>
11
12 namespace boost {
13 namespace http_proto {
14
15 auto
16 18443 sink::
17 on_write(
18 bool,
19 boost::span<buffers::const_buffer const> bs,
20 bool more) ->
21 results
22 {
23 18443 auto it = bs.begin();
24 18443 auto const end_ = bs.end();
25 18443 results rv;
26
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 18443 times.
18443 if(it == end_)
27 return rv;
28 do
29 {
30 36887 buffers::const_buffer b(*it++);
31
1/2
✓ Branch 1 taken 36887 times.
✗ Branch 2 not taken.
36887 rv += on_write(
32 b,
33
4/4
✓ Branch 0 taken 18441 times.
✓ Branch 1 taken 18446 times.
✓ Branch 2 taken 18127 times.
✓ Branch 3 taken 314 times.
73774 it != end_ || more);
34
2/2
✓ Branch 1 taken 3 times.
✓ Branch 2 taken 36884 times.
36887 if(rv.ec.failed())
35 3 return rv;
36 }
37
2/2
✓ Branch 0 taken 18444 times.
✓ Branch 1 taken 18440 times.
36884 while(it != end_);
38 18440 return rv;
39 }
40
41 } // http_proto
42 } // boost
43