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

Improve reverseproxy #520

Merged
merged 20 commits into from
Feb 7, 2024
Merged

Improve reverseproxy #520

merged 20 commits into from
Feb 7, 2024

Conversation

qicosmos
Copy link
Owner

@qicosmos qicosmos commented Feb 4, 2024

support reverse proxy:

TEST_CASE("test reverse proxy") {
  cinatra::coro_http_server web_one(1, 9001);

  web_one.set_http_handler<cinatra::GET, cinatra::POST>(
      "/",
      [](coro_http_request &req,
         coro_http_response &response) -> async_simple::coro::Lazy<void> {
        co_await coro_io::post([&]() {
          response.set_status_and_content(status_type::ok, "web1");
        });
      });

  web_one.async_start();

  cinatra::coro_http_server web_two(1, 9002);

  web_two.set_http_handler<cinatra::GET, cinatra::POST>(
      "/",
      [](coro_http_request &req,
         coro_http_response &response) -> async_simple::coro::Lazy<void> {
        co_await coro_io::post([&]() {
          response.set_status_and_content(status_type::ok, "web2");
        });
      });

  web_two.async_start();

  cinatra::coro_http_server web_three(1, 9003);

  web_three.set_http_handler<cinatra::GET, cinatra::POST>(
      "/",
      [](coro_http_request &req,
         coro_http_response &response) -> async_simple::coro::Lazy<void> {
        co_await coro_io::post([&]() {
          response.set_status_and_content(status_type::ok, "web3");
        });
      });

  web_three.async_start();

  std::this_thread::sleep_for(200ms);

  reverse_proxy proxy_wrr(10, 8090);
  proxy_wrr.add_dest_host("127.0.0.1:9001", 10);
  proxy_wrr.add_dest_host("127.0.0.1:9002", 5);
  proxy_wrr.add_dest_host("127.0.0.1:9003", 5);
  proxy_wrr.start_reverse_proxy<GET, POST>("/wrr", false,
                                           coro_io::load_blance_algorithm::WRR);

  reverse_proxy proxy_rr(10, 8091);
  proxy_rr.add_dest_host("127.0.0.1:9001");
  proxy_rr.add_dest_host("127.0.0.1:9002");
  proxy_rr.add_dest_host("127.0.0.1:9003");
  proxy_rr.start_reverse_proxy<GET, POST>("/rr", false,
                                          coro_io::load_blance_algorithm::RR);

  reverse_proxy proxy_hash(10, 8092);
  proxy_hash.add_dest_host("127.0.0.1:9001");
  proxy_hash.add_dest_host("127.0.0.1:9002");
  proxy_hash.add_dest_host("127.0.0.1:9003");
  proxy_hash.start_reverse_proxy<GET, POST>(
      "/ip_hash", false, coro_io::load_blance_algorithm::random);

  std::this_thread::sleep_for(200ms);

  coro_http_client client_rr;
  resp_data resp_rr = client_rr.get("http://127.0.0.1:8091/rr");
  CHECK(resp_rr.resp_body == "web1");
  resp_rr = client_rr.get("http://127.0.0.1:8091/rr");
  CHECK(resp_rr.resp_body == "web2");
  resp_rr = client_rr.get("http://127.0.0.1:8091/rr");
  CHECK(resp_rr.resp_body == "web3");
  resp_rr = client_rr.get("http://127.0.0.1:8091/rr");
  CHECK(resp_rr.resp_body == "web1");
  resp_rr = client_rr.get("http://127.0.0.1:8091/rr");
  CHECK(resp_rr.resp_body == "web2");

  coro_http_client client_wrr;
  resp_data resp = client_wrr.get("http://127.0.0.1:8090/wrr");
  CHECK(resp.resp_body == "web1");
  resp = client_wrr.get("http://127.0.0.1:8090/wrr");
  CHECK(resp.resp_body == "web1");
  resp = client_wrr.get("http://127.0.0.1:8090/wrr");
  CHECK(resp.resp_body == "web2");
  resp = client_wrr.get("http://127.0.0.1:8090/wrr");
  CHECK(resp.resp_body == "web3");

  coro_http_client client_hash;
  resp_data resp_hash = client_hash.get("http://127.0.0.1:8092/ip_hash");
  std::cout << resp_hash.resp_body << "\n";
  CHECK(!resp_hash.resp_body.empty());
}

Copy link

github-actions bot commented Feb 4, 2024

Code Coverage Report
for detail, goto summary download Artifacts

Filename                          Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cinatra_log_wrapper.hpp                   4                 1    75.00%           9                 1    88.89%           0                 0         -
cookie.hpp                               15                 2    86.67%          84                 2    97.62%          28                 3    89.29%
coro_http_client.hpp                     86                 5    94.19%        1425               207    85.47%         456               117    74.34%
coro_http_connection.hpp                 35                 1    97.14%         649               154    76.27%         192                61    68.23%
coro_http_request.hpp                    26                 4    84.62%         186                16    91.40%          72                10    86.11%
coro_http_response.hpp                   23                 5    78.26%         180                62    65.56%          76                36    52.63%
coro_http_router.hpp                     16                 2    87.50%         176                43    75.57%          38                12    68.42%
coro_http_server.hpp                     36                 1    97.22%         706                62    91.22%         144                36    75.00%
coro_radix_tree.hpp                      17                 0   100.00%         274                40    85.40%         144                32    77.78%
define.h                                  1                 0   100.00%          24                 2    91.67%          20                 1    95.00%
http_parser.hpp                          25                 4    84.00%         184                30    83.70%          50                12    76.00%
mime_types.hpp                            1                 0   100.00%           7                 2    71.43%           2                 1    50.00%
multipart.hpp                             4                 0   100.00%          86                13    84.88%          20                 4    80.00%
picohttpparser.h                         14                 6    57.14%         450               277    38.44%         198               101    48.99%
response_cv.hpp                           2                 0   100.00%          55                32    41.82%          46                16    65.22%
session.hpp                              11                 0   100.00%          54                 2    96.30%           4                 1    75.00%
session_manager.hpp                      10                 1    90.00%          67                 5    92.54%          10                 1    90.00%
sha1.hpp                                 12                 0   100.00%         183                 8    95.63%          12                 2    83.33%
string_resize.hpp                         2                 0   100.00%          18                 0   100.00%           2                 0   100.00%
time_util.hpp                            20                 1    95.00%         315                41    86.98%         184                44    76.09%
uri.hpp                                  17                 5    70.59%         200                59    70.50%         166                50    69.88%
url_encode_decode.hpp                     4                 0   100.00%          85                20    76.47%          48                16    66.67%
utils.hpp                                14                 0   100.00%         202                22    89.11%         116                43    62.93%
websocket.hpp                            14                 3    78.57%         174                13    92.53%          78                18    76.92%
ylt/coro_io/coro_file.hpp                17                 1    94.12%         162                31    80.86%          42                15    64.29%
ylt/coro_io/coro_io.hpp                  38                 1    97.37%         219                 7    96.80%           2                 0   100.00%
ylt/coro_io/io_context_pool.hpp          29                 8    72.41%         173                37    78.61%          18                 4    77.78%
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                   493                51    89.66%        6347              1188    81.28%        2168               636    70.66%

Copy link

github-actions bot commented Feb 4, 2024

Code Coverage Report
for detail, goto summary download Artifacts

Filename                          Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cinatra_log_wrapper.hpp                   4                 1    75.00%           9                 1    88.89%           0                 0         -
cookie.hpp                               15                 2    86.67%          84                 2    97.62%          28                 3    89.29%
coro_http_client.hpp                     86                 5    94.19%        1425               207    85.47%         456               117    74.34%
coro_http_connection.hpp                 35                 1    97.14%         649               154    76.27%         192                61    68.23%
coro_http_request.hpp                    26                 4    84.62%         186                16    91.40%          72                10    86.11%
coro_http_response.hpp                   23                 5    78.26%         180                62    65.56%          76                36    52.63%
coro_http_router.hpp                     16                 2    87.50%         176                43    75.57%          38                12    68.42%
coro_http_server.hpp                     36                 1    97.22%         706                62    91.22%         144                36    75.00%
coro_radix_tree.hpp                      17                 0   100.00%         274                40    85.40%         144                32    77.78%
define.h                                  1                 0   100.00%          24                 2    91.67%          20                 1    95.00%
http_parser.hpp                          25                 4    84.00%         184                30    83.70%          50                12    76.00%
mime_types.hpp                            1                 0   100.00%           7                 2    71.43%           2                 1    50.00%
multipart.hpp                             4                 0   100.00%          86                13    84.88%          20                 4    80.00%
picohttpparser.h                         14                 6    57.14%         450               277    38.44%         198               101    48.99%
response_cv.hpp                           2                 0   100.00%          55                32    41.82%          46                16    65.22%
session.hpp                              11                 0   100.00%          54                 2    96.30%           4                 1    75.00%
session_manager.hpp                      10                 1    90.00%          67                 5    92.54%          10                 1    90.00%
sha1.hpp                                 12                 0   100.00%         183                 8    95.63%          12                 2    83.33%
string_resize.hpp                         2                 0   100.00%          18                 0   100.00%           2                 0   100.00%
time_util.hpp                            20                 1    95.00%         315                41    86.98%         184                44    76.09%
uri.hpp                                  17                 5    70.59%         200                59    70.50%         166                50    69.88%
url_encode_decode.hpp                     4                 0   100.00%          85                20    76.47%          48                16    66.67%
utils.hpp                                14                 0   100.00%         202                22    89.11%         116                43    62.93%
websocket.hpp                            14                 3    78.57%         174                13    92.53%          78                18    76.92%
ylt/coro_io/coro_file.hpp                17                 1    94.12%         162                31    80.86%          42                15    64.29%
ylt/coro_io/coro_io.hpp                  38                 1    97.37%         219                 7    96.80%           2                 0   100.00%
ylt/coro_io/io_context_pool.hpp          29                 8    72.41%         173                37    78.61%          18                 4    77.78%
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                   493                51    89.66%        6347              1188    81.28%        2168               636    70.66%

Copy link

github-actions bot commented Feb 4, 2024

Code Coverage Report
for detail, goto summary download Artifacts

Filename                          Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cinatra_log_wrapper.hpp                   4                 1    75.00%           9                 1    88.89%           0                 0         -
cookie.hpp                               15                 2    86.67%          84                 2    97.62%          28                 3    89.29%
coro_http_client.hpp                     86                 5    94.19%        1425               209    85.33%         456               118    74.12%
coro_http_connection.hpp                 35                 1    97.14%         649               154    76.27%         192                61    68.23%
coro_http_request.hpp                    26                 4    84.62%         186                16    91.40%          72                10    86.11%
coro_http_response.hpp                   23                 5    78.26%         180                62    65.56%          76                36    52.63%
coro_http_router.hpp                     16                 2    87.50%         176                43    75.57%          38                12    68.42%
coro_http_server.hpp                     36                 1    97.22%         706                62    91.22%         144                36    75.00%
coro_radix_tree.hpp                      17                 0   100.00%         274                40    85.40%         144                32    77.78%
define.h                                  1                 0   100.00%          24                 2    91.67%          20                 1    95.00%
http_parser.hpp                          25                 4    84.00%         184                30    83.70%          50                12    76.00%
mime_types.hpp                            1                 0   100.00%           7                 2    71.43%           2                 1    50.00%
multipart.hpp                             4                 0   100.00%          86                13    84.88%          20                 4    80.00%
picohttpparser.h                         14                 6    57.14%         450               277    38.44%         198               101    48.99%
response_cv.hpp                           2                 0   100.00%          55                32    41.82%          46                16    65.22%
session.hpp                              11                 0   100.00%          54                 2    96.30%           4                 1    75.00%
session_manager.hpp                      10                 1    90.00%          67                 5    92.54%          10                 1    90.00%
sha1.hpp                                 12                 0   100.00%         183                 8    95.63%          12                 2    83.33%
string_resize.hpp                         2                 0   100.00%          18                 0   100.00%           2                 0   100.00%
time_util.hpp                            20                 1    95.00%         315                41    86.98%         184                44    76.09%
uri.hpp                                  17                 5    70.59%         200                59    70.50%         166                50    69.88%
url_encode_decode.hpp                     4                 0   100.00%          85                20    76.47%          48                16    66.67%
utils.hpp                                14                 0   100.00%         202                22    89.11%         116                43    62.93%
websocket.hpp                            14                 3    78.57%         174                13    92.53%          78                18    76.92%
ylt/coro_io/coro_file.hpp                17                 1    94.12%         162                31    80.86%          42                15    64.29%
ylt/coro_io/coro_io.hpp                  38                 1    97.37%         219                 7    96.80%           2                 0   100.00%
ylt/coro_io/io_context_pool.hpp          29                 8    72.41%         173                37    78.61%          18                 4    77.78%
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                   493                51    89.66%        6347              1190    81.25%        2168               637    70.62%

Copy link

github-actions bot commented Feb 4, 2024

Code Coverage Report
for detail, goto summary download Artifacts

Filename                          Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cinatra_log_wrapper.hpp                   4                 1    75.00%           9                 1    88.89%           0                 0         -
cookie.hpp                               15                 2    86.67%          84                 2    97.62%          28                 3    89.29%
coro_http_client.hpp                     86                 5    94.19%        1425               209    85.33%         456               118    74.12%
coro_http_connection.hpp                 35                 1    97.14%         649               154    76.27%         192                61    68.23%
coro_http_request.hpp                    26                 4    84.62%         186                16    91.40%          72                10    86.11%
coro_http_response.hpp                   23                 5    78.26%         180                62    65.56%          76                36    52.63%
coro_http_router.hpp                     16                 2    87.50%         176                43    75.57%          38                12    68.42%
coro_http_server.hpp                     36                 1    97.22%         706                62    91.22%         144                36    75.00%
coro_radix_tree.hpp                      17                 0   100.00%         274                40    85.40%         144                32    77.78%
define.h                                  1                 0   100.00%          24                 2    91.67%          20                 1    95.00%
http_parser.hpp                          25                 4    84.00%         184                30    83.70%          50                12    76.00%
mime_types.hpp                            1                 0   100.00%           7                 2    71.43%           2                 1    50.00%
multipart.hpp                             4                 0   100.00%          86                13    84.88%          20                 4    80.00%
picohttpparser.h                         14                 6    57.14%         450               277    38.44%         198               101    48.99%
response_cv.hpp                           2                 0   100.00%          55                32    41.82%          46                16    65.22%
session.hpp                              11                 0   100.00%          54                 2    96.30%           4                 1    75.00%
session_manager.hpp                      10                 1    90.00%          67                 5    92.54%          10                 1    90.00%
sha1.hpp                                 12                 0   100.00%         183                 8    95.63%          12                 2    83.33%
string_resize.hpp                         2                 0   100.00%          18                 0   100.00%           2                 0   100.00%
time_util.hpp                            20                 1    95.00%         315                41    86.98%         184                44    76.09%
uri.hpp                                  17                 5    70.59%         200                59    70.50%         166                50    69.88%
url_encode_decode.hpp                     4                 0   100.00%          85                20    76.47%          48                16    66.67%
utils.hpp                                14                 0   100.00%         202                22    89.11%         116                43    62.93%
websocket.hpp                            14                 3    78.57%         174                13    92.53%          78                18    76.92%
ylt/coro_io/coro_file.hpp                17                 1    94.12%         162                31    80.86%          42                15    64.29%
ylt/coro_io/coro_io.hpp                  38                 1    97.37%         219                 7    96.80%           2                 0   100.00%
ylt/coro_io/io_context_pool.hpp          29                 8    72.41%         173                37    78.61%          18                 4    77.78%
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                   493                51    89.66%        6347              1190    81.25%        2168               637    70.62%

@codecov-commenter
Copy link

codecov-commenter commented Feb 4, 2024

Codecov Report

Attention: 57 lines in your changes are missing coverage. Please review.

Comparison is base (c8fe85d) 70.73% compared to head (979add5) 69.68%.

Files Patch % Lines
include/cinatra/ylt/coro_io/client_pool.hpp 70.87% 30 Missing ⚠️
...nclude/cinatra/ylt/coro_io/detail/client_queue.hpp 58.82% 14 Missing ⚠️
include/cinatra/ylt/util/expected.hpp 25.00% 6 Missing ⚠️
include/cinatra/coro_http_response.hpp 92.85% 2 Missing ⚠️
include/cinatra/coro_http_reverse_proxy.hpp 92.59% 2 Missing ⚠️
include/cinatra/ylt/coro_io/channel.hpp 96.66% 2 Missing ⚠️
include/cinatra/define.h 75.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #520      +/-   ##
==========================================
- Coverage   70.73%   69.68%   -1.05%     
==========================================
  Files         214      222       +8     
  Lines       12622    13531     +909     
==========================================
+ Hits         8928     9429     +501     
- Misses       3694     4102     +408     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Feb 5, 2024

Code Coverage Report
for detail, goto summary download Artifacts

Filename                          Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cinatra_log_wrapper.hpp                   4                 1    75.00%           9                 1    88.89%           0                 0         -
cookie.hpp                               15                 2    86.67%          84                 2    97.62%          28                 3    89.29%
coro_http_client.hpp                     86                 5    94.19%        1425               207    85.47%         456               117    74.34%
coro_http_connection.hpp                 35                 1    97.14%         649               154    76.27%         192                61    68.23%
coro_http_request.hpp                    26                 4    84.62%         186                16    91.40%          72                10    86.11%
coro_http_response.hpp                   23                 5    78.26%         180                62    65.56%          76                36    52.63%
coro_http_router.hpp                     16                 2    87.50%         176                43    75.57%          38                12    68.42%
coro_http_server.hpp                     36                 1    97.22%         706                62    91.22%         144                36    75.00%
coro_radix_tree.hpp                      17                 0   100.00%         274                40    85.40%         144                32    77.78%
define.h                                  1                 0   100.00%          24                 2    91.67%          20                 1    95.00%
http_parser.hpp                          25                 4    84.00%         184                30    83.70%          50                12    76.00%
mime_types.hpp                            1                 0   100.00%           7                 2    71.43%           2                 1    50.00%
multipart.hpp                             4                 0   100.00%          86                13    84.88%          20                 4    80.00%
picohttpparser.h                         14                 6    57.14%         450               277    38.44%         198               101    48.99%
response_cv.hpp                           2                 0   100.00%          55                32    41.82%          46                16    65.22%
session.hpp                              11                 0   100.00%          54                 2    96.30%           4                 1    75.00%
session_manager.hpp                      10                 1    90.00%          67                 5    92.54%          10                 1    90.00%
sha1.hpp                                 12                 0   100.00%         183                 8    95.63%          12                 2    83.33%
string_resize.hpp                         2                 0   100.00%          18                 0   100.00%           2                 0   100.00%
time_util.hpp                            20                 1    95.00%         315                41    86.98%         184                44    76.09%
uri.hpp                                  17                 5    70.59%         200                59    70.50%         166                50    69.88%
url_encode_decode.hpp                     4                 0   100.00%          85                20    76.47%          48                16    66.67%
utils.hpp                                14                 0   100.00%         202                22    89.11%         116                43    62.93%
websocket.hpp                            14                 3    78.57%         174                13    92.53%          78                18    76.92%
ylt/coro_io/coro_file.hpp                17                 1    94.12%         162                31    80.86%          42                15    64.29%
ylt/coro_io/coro_io.hpp                  38                 1    97.37%         219                 7    96.80%           2                 0   100.00%
ylt/coro_io/io_context_pool.hpp          29                 8    72.41%         173                37    78.61%          18                 4    77.78%
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                   493                51    89.66%        6347              1188    81.28%        2168               636    70.66%

Copy link

github-actions bot commented Feb 5, 2024

Code Coverage Report
for detail, goto summary download Artifacts

Filename                          Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cinatra_log_wrapper.hpp                   4                 1    75.00%           9                 1    88.89%           0                 0         -
cookie.hpp                               15                 2    86.67%          84                 2    97.62%          28                 3    89.29%
coro_http_client.hpp                     86                 5    94.19%        1425               207    85.47%         456               117    74.34%
coro_http_connection.hpp                 35                 1    97.14%         649               154    76.27%         192                61    68.23%
coro_http_request.hpp                    26                 4    84.62%         186                16    91.40%          72                10    86.11%
coro_http_response.hpp                   23                 5    78.26%         180                62    65.56%          76                36    52.63%
coro_http_router.hpp                     16                 2    87.50%         176                43    75.57%          38                12    68.42%
coro_http_server.hpp                     36                 1    97.22%         706                62    91.22%         144                36    75.00%
coro_radix_tree.hpp                      17                 0   100.00%         274                40    85.40%         144                32    77.78%
define.h                                  1                 0   100.00%          24                 2    91.67%          20                 1    95.00%
http_parser.hpp                          25                 4    84.00%         184                30    83.70%          50                12    76.00%
mime_types.hpp                            1                 0   100.00%           7                 2    71.43%           2                 1    50.00%
multipart.hpp                             4                 0   100.00%          86                13    84.88%          20                 4    80.00%
picohttpparser.h                         14                 6    57.14%         450               277    38.44%         198               101    48.99%
response_cv.hpp                           2                 0   100.00%          55                32    41.82%          46                16    65.22%
session.hpp                              11                 0   100.00%          54                 2    96.30%           4                 1    75.00%
session_manager.hpp                      10                 1    90.00%          67                 5    92.54%          10                 1    90.00%
sha1.hpp                                 12                 0   100.00%         183                 8    95.63%          12                 2    83.33%
string_resize.hpp                         2                 0   100.00%          18                 0   100.00%           2                 0   100.00%
time_util.hpp                            20                 1    95.00%         315                41    86.98%         184                44    76.09%
uri.hpp                                  17                 5    70.59%         200                59    70.50%         166                50    69.88%
url_encode_decode.hpp                     4                 0   100.00%          85                20    76.47%          48                16    66.67%
utils.hpp                                14                 0   100.00%         202                22    89.11%         116                43    62.93%
websocket.hpp                            14                 3    78.57%         174                13    92.53%          78                18    76.92%
ylt/coro_io/coro_file.hpp                17                 1    94.12%         162                31    80.86%          42                15    64.29%
ylt/coro_io/coro_io.hpp                  38                 1    97.37%         219                 7    96.80%           2                 0   100.00%
ylt/coro_io/io_context_pool.hpp          29                 8    72.41%         173                37    78.61%          18                 4    77.78%
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                   493                51    89.66%        6347              1188    81.28%        2168               636    70.66%

Copy link

github-actions bot commented Feb 7, 2024

Code Coverage Report
for detail, goto summary download Artifacts

Filename                          Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cinatra_log_wrapper.hpp                   4                 1    75.00%           9                 1    88.89%           0                 0         -
cookie.hpp                               15                 2    86.67%          84                 2    97.62%          28                 3    89.29%
coro_http_client.hpp                     86                 5    94.19%        1425               208    85.40%         456               118    74.12%
coro_http_connection.hpp                 35                 1    97.14%         650               154    76.31%         192                61    68.23%
coro_http_request.hpp                    27                 4    85.19%         187                16    91.44%          72                10    86.11%
coro_http_response.hpp                   23                 5    78.26%         180                62    65.56%          76                36    52.63%
coro_http_router.hpp                     16                 2    87.50%         176                43    75.57%          38                12    68.42%
coro_http_server.hpp                     36                 1    97.22%         706                65    90.79%         144                37    74.31%
coro_radix_tree.hpp                      17                 0   100.00%         274                40    85.40%         144                32    77.78%
define.h                                  1                 0   100.00%          24                 2    91.67%          20                 1    95.00%
http_parser.hpp                          25                 4    84.00%         184                30    83.70%          50                12    76.00%
mime_types.hpp                            1                 0   100.00%           7                 2    71.43%           2                 1    50.00%
multipart.hpp                             4                 0   100.00%          86                13    84.88%          20                 4    80.00%
picohttpparser.h                         14                 6    57.14%         450               277    38.44%         198               101    48.99%
response_cv.hpp                           2                 0   100.00%          55                32    41.82%          46                16    65.22%
session.hpp                              11                 0   100.00%          54                 2    96.30%           4                 1    75.00%
session_manager.hpp                      10                 1    90.00%          67                 5    92.54%          10                 1    90.00%
sha1.hpp                                 12                 0   100.00%         183                 8    95.63%          12                 2    83.33%
string_resize.hpp                         2                 0   100.00%          18                 0   100.00%           2                 0   100.00%
time_util.hpp                            20                 1    95.00%         315                41    86.98%         184                44    76.09%
uri.hpp                                  17                 5    70.59%         200                59    70.50%         166                50    69.88%
url_encode_decode.hpp                     4                 0   100.00%          85                20    76.47%          48                16    66.67%
utils.hpp                                14                 0   100.00%         202                22    89.11%         116                43    62.93%
websocket.hpp                            14                 3    78.57%         174                13    92.53%          78                18    76.92%
ylt/coro_io/coro_file.hpp                17                 1    94.12%         162                31    80.86%          42                15    64.29%
ylt/coro_io/coro_io.hpp                  38                 1    97.37%         219                 7    96.80%           2                 0   100.00%
ylt/coro_io/io_context_pool.hpp          29                 8    72.41%         173                37    78.61%          18                 4    77.78%
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                   494                51    89.68%        6349              1192    81.23%        2168               638    70.57%

Copy link

github-actions bot commented Feb 7, 2024

Code Coverage Report
for detail, goto summary download Artifacts

Filename                          Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cinatra_log_wrapper.hpp                   4                 1    75.00%           9                 1    88.89%           0                 0         -
cookie.hpp                               15                 2    86.67%          84                 2    97.62%          28                 3    89.29%
coro_http_client.hpp                     86                 5    94.19%        1425               209    85.33%         456               118    74.12%
coro_http_connection.hpp                 35                 1    97.14%         650               154    76.31%         192                61    68.23%
coro_http_request.hpp                    27                 4    85.19%         187                16    91.44%          72                10    86.11%
coro_http_response.hpp                   23                 5    78.26%         180                62    65.56%          76                36    52.63%
coro_http_router.hpp                     16                 2    87.50%         176                43    75.57%          38                12    68.42%
coro_http_server.hpp                     36                 1    97.22%         706                62    91.22%         144                36    75.00%
coro_radix_tree.hpp                      17                 0   100.00%         274                40    85.40%         144                32    77.78%
define.h                                  1                 0   100.00%          24                 2    91.67%          20                 1    95.00%
http_parser.hpp                          25                 4    84.00%         184                30    83.70%          50                12    76.00%
mime_types.hpp                            1                 0   100.00%           7                 2    71.43%           2                 1    50.00%
multipart.hpp                             4                 0   100.00%          86                13    84.88%          20                 4    80.00%
picohttpparser.h                         14                 6    57.14%         450               277    38.44%         198               101    48.99%
response_cv.hpp                           2                 0   100.00%          55                32    41.82%          46                16    65.22%
session.hpp                              11                 0   100.00%          54                 2    96.30%           4                 1    75.00%
session_manager.hpp                      10                 1    90.00%          67                 5    92.54%          10                 1    90.00%
sha1.hpp                                 12                 0   100.00%         183                 8    95.63%          12                 2    83.33%
string_resize.hpp                         2                 0   100.00%          18                 0   100.00%           2                 0   100.00%
time_util.hpp                            20                 1    95.00%         315                41    86.98%         184                44    76.09%
uri.hpp                                  17                 5    70.59%         200                59    70.50%         166                50    69.88%
url_encode_decode.hpp                     4                 0   100.00%          85                20    76.47%          48                16    66.67%
utils.hpp                                14                 0   100.00%         202                22    89.11%         116                43    62.93%
websocket.hpp                            14                 3    78.57%         174                13    92.53%          78                18    76.92%
ylt/coro_io/coro_file.hpp                17                 1    94.12%         162                31    80.86%          42                15    64.29%
ylt/coro_io/coro_io.hpp                  38                 1    97.37%         219                 7    96.80%           2                 0   100.00%
ylt/coro_io/io_context_pool.hpp          29                 8    72.41%         173                37    78.61%          18                 4    77.78%
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                   494                51    89.68%        6349              1190    81.26%        2168               637    70.62%

Copy link

github-actions bot commented Feb 7, 2024

Code Coverage Report
for detail, goto summary download Artifacts

Filename                          Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cinatra_log_wrapper.hpp                   4                 1    75.00%           9                 1    88.89%           0                 0         -
cookie.hpp                               15                 2    86.67%          84                 2    97.62%          28                 3    89.29%
coro_http_client.hpp                     86                 5    94.19%        1425               207    85.47%         456               117    74.34%
coro_http_connection.hpp                 35                 1    97.14%         650               154    76.31%         192                61    68.23%
coro_http_request.hpp                    27                 4    85.19%         187                16    91.44%          72                10    86.11%
coro_http_response.hpp                   23                 5    78.26%         180                62    65.56%          76                36    52.63%
coro_http_router.hpp                     16                 2    87.50%         176                43    75.57%          38                12    68.42%
coro_http_server.hpp                     36                 1    97.22%         706                62    91.22%         144                36    75.00%
coro_radix_tree.hpp                      17                 0   100.00%         274                40    85.40%         144                32    77.78%
define.h                                  1                 0   100.00%          24                 2    91.67%          20                 1    95.00%
http_parser.hpp                          25                 4    84.00%         184                30    83.70%          50                12    76.00%
mime_types.hpp                            1                 0   100.00%           7                 2    71.43%           2                 1    50.00%
multipart.hpp                             4                 0   100.00%          86                13    84.88%          20                 4    80.00%
picohttpparser.h                         14                 6    57.14%         450               277    38.44%         198               101    48.99%
response_cv.hpp                           2                 0   100.00%          55                32    41.82%          46                16    65.22%
session.hpp                              11                 0   100.00%          54                 2    96.30%           4                 1    75.00%
session_manager.hpp                      10                 1    90.00%          67                 5    92.54%          10                 1    90.00%
sha1.hpp                                 12                 0   100.00%         183                 8    95.63%          12                 2    83.33%
string_resize.hpp                         2                 0   100.00%          18                 0   100.00%           2                 0   100.00%
time_util.hpp                            20                 1    95.00%         315                41    86.98%         184                44    76.09%
uri.hpp                                  17                 5    70.59%         200                59    70.50%         166                50    69.88%
url_encode_decode.hpp                     4                 0   100.00%          85                20    76.47%          48                16    66.67%
utils.hpp                                14                 0   100.00%         202                22    89.11%         116                43    62.93%
websocket.hpp                            14                 3    78.57%         174                13    92.53%          78                18    76.92%
ylt/coro_io/coro_file.hpp                17                 1    94.12%         162                31    80.86%          42                15    64.29%
ylt/coro_io/coro_io.hpp                  38                 1    97.37%         219                 7    96.80%           2                 0   100.00%
ylt/coro_io/io_context_pool.hpp          29                 8    72.41%         173                37    78.61%          18                 4    77.78%
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                   494                51    89.68%        6349              1188    81.29%        2168               636    70.66%

Copy link

github-actions bot commented Feb 7, 2024

Code Coverage Report
for detail, goto summary download Artifacts

Filename                          Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cinatra_log_wrapper.hpp                   4                 1    75.00%           9                 1    88.89%           0                 0         -
cookie.hpp                               15                 2    86.67%          84                 2    97.62%          28                 3    89.29%
coro_http_client.hpp                     86                 5    94.19%        1425               209    85.33%         456               118    74.12%
coro_http_connection.hpp                 35                 1    97.14%         650               154    76.31%         192                61    68.23%
coro_http_request.hpp                    27                 4    85.19%         187                16    91.44%          72                10    86.11%
coro_http_response.hpp                   23                 5    78.26%         180                62    65.56%          76                36    52.63%
coro_http_router.hpp                     16                 2    87.50%         176                43    75.57%          38                12    68.42%
coro_http_server.hpp                     36                 1    97.22%         706                62    91.22%         144                36    75.00%
coro_radix_tree.hpp                      17                 0   100.00%         274                40    85.40%         144                32    77.78%
define.h                                  1                 0   100.00%          24                 2    91.67%          20                 1    95.00%
http_parser.hpp                          25                 4    84.00%         184                30    83.70%          50                12    76.00%
mime_types.hpp                            1                 0   100.00%           7                 2    71.43%           2                 1    50.00%
multipart.hpp                             4                 0   100.00%          86                13    84.88%          20                 4    80.00%
picohttpparser.h                         14                 6    57.14%         450               277    38.44%         198               101    48.99%
response_cv.hpp                           2                 0   100.00%          55                32    41.82%          46                16    65.22%
session.hpp                              11                 0   100.00%          54                 2    96.30%           4                 1    75.00%
session_manager.hpp                      10                 1    90.00%          67                 5    92.54%          10                 1    90.00%
sha1.hpp                                 12                 0   100.00%         183                 8    95.63%          12                 2    83.33%
string_resize.hpp                         2                 0   100.00%          18                 0   100.00%           2                 0   100.00%
time_util.hpp                            20                 1    95.00%         315                41    86.98%         184                44    76.09%
uri.hpp                                  17                 5    70.59%         200                59    70.50%         166                50    69.88%
url_encode_decode.hpp                     4                 0   100.00%          85                20    76.47%          48                16    66.67%
utils.hpp                                14                 0   100.00%         202                22    89.11%         116                43    62.93%
websocket.hpp                            14                 3    78.57%         174                13    92.53%          78                18    76.92%
ylt/coro_io/coro_file.hpp                17                 1    94.12%         162                31    80.86%          42                15    64.29%
ylt/coro_io/coro_io.hpp                  38                 1    97.37%         219                 7    96.80%           2                 0   100.00%
ylt/coro_io/io_context_pool.hpp          29                 8    72.41%         173                37    78.61%          18                 4    77.78%
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                   494                51    89.68%        6349              1190    81.26%        2168               637    70.62%

Copy link

github-actions bot commented Feb 7, 2024

Code Coverage Report
for detail, goto summary download Artifacts

Filename                          Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cinatra_log_wrapper.hpp                   4                 1    75.00%           9                 1    88.89%           0                 0         -
cookie.hpp                               15                 2    86.67%          84                 2    97.62%          28                 3    89.29%
coro_http_client.hpp                     86                 5    94.19%        1425               210    85.26%         456               119    73.90%
coro_http_connection.hpp                 35                 1    97.14%         650               154    76.31%         192                61    68.23%
coro_http_request.hpp                    27                 4    85.19%         187                16    91.44%          72                10    86.11%
coro_http_response.hpp                   23                 5    78.26%         180                62    65.56%          76                36    52.63%
coro_http_router.hpp                     16                 2    87.50%         176                43    75.57%          38                12    68.42%
coro_http_server.hpp                     36                 1    97.22%         706                62    91.22%         144                36    75.00%
coro_radix_tree.hpp                      17                 0   100.00%         274                40    85.40%         144                32    77.78%
define.h                                  1                 0   100.00%          24                 2    91.67%          20                 1    95.00%
http_parser.hpp                          25                 4    84.00%         184                30    83.70%          50                12    76.00%
mime_types.hpp                            1                 0   100.00%           7                 2    71.43%           2                 1    50.00%
multipart.hpp                             4                 0   100.00%          86                13    84.88%          20                 4    80.00%
picohttpparser.h                         14                 6    57.14%         450               277    38.44%         198               101    48.99%
response_cv.hpp                           2                 0   100.00%          55                32    41.82%          46                16    65.22%
session.hpp                              11                 0   100.00%          54                 2    96.30%           4                 1    75.00%
session_manager.hpp                      10                 1    90.00%          67                 5    92.54%          10                 1    90.00%
sha1.hpp                                 12                 0   100.00%         183                 8    95.63%          12                 2    83.33%
string_resize.hpp                         2                 0   100.00%          18                 0   100.00%           2                 0   100.00%
time_util.hpp                            20                 1    95.00%         315                41    86.98%         184                44    76.09%
uri.hpp                                  17                 5    70.59%         200                59    70.50%         166                50    69.88%
url_encode_decode.hpp                     4                 0   100.00%          85                20    76.47%          48                16    66.67%
utils.hpp                                14                 0   100.00%         202                22    89.11%         116                43    62.93%
websocket.hpp                            14                 3    78.57%         174                13    92.53%          78                18    76.92%
ylt/coro_io/coro_file.hpp                17                 1    94.12%         162                31    80.86%          42                15    64.29%
ylt/coro_io/coro_io.hpp                  38                 1    97.37%         219                 7    96.80%           2                 0   100.00%
ylt/coro_io/io_context_pool.hpp          29                 8    72.41%         173                37    78.61%          18                 4    77.78%
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                   494                51    89.68%        6349              1191    81.24%        2168               638    70.57%

@qicosmos qicosmos merged commit b4fa24a into master Feb 7, 2024
22 checks passed
@qicosmos qicosmos deleted the improve_reverseproxy branch February 7, 2024 07:50
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.

3 participants