qicosmos / cinatra

modern c++(c++20), cross-platform, header-only, easy to use http framework
MIT License
1.82k stars 369 forks source link

improve performance #529

Closed qicosmos closed 4 months ago

github-actions[bot] commented 4 months ago

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                 4    95.35%        1425               204    85.68%         456               116    74.56%
coro_http_connection.hpp                     35                 1    97.14%         650               154    76.31%         192                61    68.23%
coro_http_request.hpp                        27                 4    85.19%         192                16    91.67%          74                10    86.49%
coro_http_response.hpp                       26                 5    80.77%         205                63    69.27%          88                37    57.95%
coro_http_router.hpp                         15                 0   100.00%         188                36    80.85%          20                 8    60.00%
coro_http_server.hpp                         40                 1    97.50%         776                66    91.49%         152                38    75.00%
coro_radix_tree.hpp                          17                 0   100.00%         274                40    85.40%         144                32    77.78%
define.h                                      2                 0   100.00%          28                 2    92.86%          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%         181                 8    95.58%          12                 2    83.33%
string_resize.hpp                             2                 0   100.00%          18                 0   100.00%           2                 0   100.00%
time_util.hpp                                18                 7    61.11%         154                70    54.55%          26                 2    92.31%
uri.hpp                                      17                 5    70.59%         200                57    71.50%         166                49    70.48%
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/channel.hpp                      15                 0   100.00%         106                 7    93.40%          30                 5    83.33%
ylt/coro_io/client_pool.hpp                  22                 4    81.82%         324               173    46.60%          72                46    36.11%
ylt/coro_io/coro_file.hpp                    17                 1    94.12%         162                31    80.86%          42                15    64.29%
ylt/coro_io/coro_io.hpp                      40                 2    95.00%         234                16    93.16%           4                 1    75.00%
ylt/coro_io/detail/client_queue.hpp          10                 5    50.00%          47                23    51.06%          10                 4    60.00%
ylt/coro_io/io_context_pool.hpp              30                 6    80.00%         174                27    84.48%          18                 4    77.78%
ylt/util/concurrentqueue.h                   78                27    65.38%        1241               722    41.82%         290               200    31.03%
ylt/util/expected.hpp                         6                 4    33.33%           6                 4    33.33%           0                 0         -
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                       633                93    85.31%        8042              2138    73.41%        2418               847    64.97%
github-actions[bot] commented 4 months ago

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                 4    95.35%        1425               204    85.68%         456               116    74.56%
coro_http_connection.hpp                     35                 1    97.14%         650               154    76.31%         192                61    68.23%
coro_http_request.hpp                        27                 4    85.19%         192                16    91.67%          74                10    86.49%
coro_http_response.hpp                       26                 5    80.77%         205                63    69.27%          88                37    57.95%
coro_http_router.hpp                         15                 0   100.00%         188                36    80.85%          20                 8    60.00%
coro_http_server.hpp                         40                 1    97.50%         776                69    91.11%         152                39    74.34%
coro_radix_tree.hpp                          17                 0   100.00%         274                40    85.40%         144                32    77.78%
define.h                                      2                 0   100.00%          28                 2    92.86%          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%         181                 8    95.58%          12                 2    83.33%
string_resize.hpp                             2                 0   100.00%          18                 0   100.00%           2                 0   100.00%
time_util.hpp                                18                 7    61.11%         154                70    54.55%          26                 2    92.31%
uri.hpp                                      17                 5    70.59%         200                57    71.50%         166                49    70.48%
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/channel.hpp                      15                 0   100.00%         106                 7    93.40%          30                 5    83.33%
ylt/coro_io/client_pool.hpp                  22                 4    81.82%         324               173    46.60%          72                46    36.11%
ylt/coro_io/coro_file.hpp                    17                 1    94.12%         162                31    80.86%          42                15    64.29%
ylt/coro_io/coro_io.hpp                      40                 2    95.00%         234                16    93.16%           4                 1    75.00%
ylt/coro_io/detail/client_queue.hpp          10                 5    50.00%          47                23    51.06%          10                 4    60.00%
ylt/coro_io/io_context_pool.hpp              30                 6    80.00%         174                27    84.48%          18                 4    77.78%
ylt/util/concurrentqueue.h                   78                27    65.38%        1241               722    41.82%         290               200    31.03%
ylt/util/expected.hpp                         6                 4    33.33%           6                 4    33.33%           0                 0         -
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                       633                93    85.31%        8042              2141    73.38%        2418               848    64.93%
github-actions[bot] commented 4 months ago

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                 4    95.35%        1425               200    85.96%         456               114    75.00%
coro_http_connection.hpp                     35                 1    97.14%         650               154    76.31%         192                61    68.23%
coro_http_request.hpp                        27                 4    85.19%         192                16    91.67%          74                10    86.49%
coro_http_response.hpp                       26                 5    80.77%         205                63    69.27%          88                37    57.95%
coro_http_router.hpp                         15                 0   100.00%         188                36    80.85%          20                 8    60.00%
coro_http_server.hpp                         40                 1    97.50%         776                66    91.49%         152                38    75.00%
coro_radix_tree.hpp                          17                 0   100.00%         274                40    85.40%         144                32    77.78%
define.h                                      2                 0   100.00%          28                 2    92.86%          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%         181                 8    95.58%          12                 2    83.33%
string_resize.hpp                             2                 0   100.00%          18                 0   100.00%           2                 0   100.00%
time_util.hpp                                18                 7    61.11%         154                70    54.55%          26                 2    92.31%
uri.hpp                                      17                 5    70.59%         200                57    71.50%         166                49    70.48%
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/channel.hpp                      15                 0   100.00%         106                 7    93.40%          30                 5    83.33%
ylt/coro_io/client_pool.hpp                  22                 4    81.82%         324               173    46.60%          72                46    36.11%
ylt/coro_io/coro_file.hpp                    17                 1    94.12%         162                31    80.86%          42                15    64.29%
ylt/coro_io/coro_io.hpp                      40                 2    95.00%         234                16    93.16%           4                 1    75.00%
ylt/coro_io/detail/client_queue.hpp          10                 5    50.00%          47                23    51.06%          10                 4    60.00%
ylt/coro_io/io_context_pool.hpp              30                 6    80.00%         174                27    84.48%          18                 4    77.78%
ylt/util/concurrentqueue.h                   78                27    65.38%        1241               722    41.82%         290               200    31.03%
ylt/util/expected.hpp                         6                 4    33.33%           6                 4    33.33%           0                 0         -
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                       633                93    85.31%        8042              2134    73.46%        2418               845    65.05%
github-actions[bot] commented 4 months ago

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                 4    95.35%        1425               200    85.96%         456               114    75.00%
coro_http_connection.hpp                     35                 1    97.14%         650               154    76.31%         192                61    68.23%
coro_http_request.hpp                        27                 4    85.19%         192                16    91.67%          74                10    86.49%
coro_http_response.hpp                       26                 5    80.77%         205                63    69.27%          88                37    57.95%
coro_http_router.hpp                         15                 0   100.00%         188                36    80.85%          20                 8    60.00%
coro_http_server.hpp                         40                 1    97.50%         776                66    91.49%         152                38    75.00%
coro_radix_tree.hpp                          17                 0   100.00%         274                40    85.40%         144                32    77.78%
define.h                                      2                 0   100.00%          28                 2    92.86%          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%         181                 8    95.58%          12                 2    83.33%
string_resize.hpp                             2                 0   100.00%          18                 0   100.00%           2                 0   100.00%
time_util.hpp                                18                 7    61.11%         154                70    54.55%          26                 2    92.31%
uri.hpp                                      17                 5    70.59%         200                57    71.50%         166                49    70.48%
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/channel.hpp                      15                 0   100.00%         106                 7    93.40%          30                 5    83.33%
ylt/coro_io/client_pool.hpp                  22                 4    81.82%         324               173    46.60%          72                46    36.11%
ylt/coro_io/coro_file.hpp                    17                 1    94.12%         162                31    80.86%          42                15    64.29%
ylt/coro_io/coro_io.hpp                      40                 2    95.00%         234                16    93.16%           4                 1    75.00%
ylt/coro_io/detail/client_queue.hpp          10                 5    50.00%          47                23    51.06%          10                 4    60.00%
ylt/coro_io/io_context_pool.hpp              30                 6    80.00%         174                27    84.48%          18                 4    77.78%
ylt/util/concurrentqueue.h                   78                27    65.38%        1241               722    41.82%         290               200    31.03%
ylt/util/expected.hpp                         6                 4    33.33%           6                 4    33.33%           0                 0         -
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                       633                93    85.31%        8042              2134    73.46%        2418               845    65.05%
github-actions[bot] commented 4 months ago

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                 4    95.35%        1425               204    85.68%         456               116    74.56%
coro_http_connection.hpp                     35                 1    97.14%         650               154    76.31%         192                61    68.23%
coro_http_request.hpp                        27                 4    85.19%         192                16    91.67%          74                10    86.49%
coro_http_response.hpp                       26                 5    80.77%         205                63    69.27%          88                37    57.95%
coro_http_router.hpp                         15                 0   100.00%         188                36    80.85%          20                 8    60.00%
coro_http_server.hpp                         40                 1    97.50%         776                66    91.49%         152                38    75.00%
coro_radix_tree.hpp                          17                 0   100.00%         274                40    85.40%         144                32    77.78%
define.h                                      2                 0   100.00%          28                 2    92.86%          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%         181                 8    95.58%          12                 2    83.33%
string_resize.hpp                             2                 0   100.00%          18                 0   100.00%           2                 0   100.00%
time_util.hpp                                18                 7    61.11%         154                70    54.55%          26                 2    92.31%
uri.hpp                                      17                 5    70.59%         200                57    71.50%         166                49    70.48%
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/channel.hpp                      15                 0   100.00%         106                 7    93.40%          30                 5    83.33%
ylt/coro_io/client_pool.hpp                  22                 4    81.82%         324               173    46.60%          72                46    36.11%
ylt/coro_io/coro_file.hpp                    17                 1    94.12%         162                31    80.86%          42                15    64.29%
ylt/coro_io/coro_io.hpp                      40                 2    95.00%         234                12    94.87%           4                 0   100.00%
ylt/coro_io/detail/client_queue.hpp          10                 5    50.00%          47                23    51.06%          10                 4    60.00%
ylt/coro_io/io_context_pool.hpp              30                 6    80.00%         174                27    84.48%          18                 4    77.78%
ylt/util/concurrentqueue.h                   78                27    65.38%        1241               722    41.82%         290               200    31.03%
ylt/util/expected.hpp                         6                 4    33.33%           6                 4    33.33%           0                 0         -
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                       633                93    85.31%        8042              2134    73.46%        2418               846    65.01%
codecov-commenter commented 4 months ago

Codecov Report

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

Comparison is base (3a98afd) 69.87% compared to head (fcfde98) 70.01%.

Files Patch % Lines
example/benchmark.cpp 0.00% 1 Missing :warning:
include/cinatra/coro_http_connection.hpp 75.00% 1 Missing :warning:
include/cinatra/http_parser.hpp 92.85% 1 Missing :warning:
include/cinatra/picohttpparser.h 93.75% 1 Missing :warning:

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

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #529 +/- ## ========================================== + Coverage 69.87% 70.01% +0.14% ========================================== Files 221 221 Lines 13492 13512 +20 ========================================== + Hits 9428 9461 +33 + Misses 4064 4051 -13 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.