Skip to content

support sse#745

Merged
qicosmos merged 13 commits into
masterfrom
support_sse
Apr 28, 2026
Merged

support sse#745
qicosmos merged 13 commits into
masterfrom
support_sse

Conversation

@qicosmos

Copy link
Copy Markdown
Owner

No description provided.

@qicosmos qicosmos left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

  1. include/cinatra/coro_http_client.hpp:1308 async_request_chunked 里 lambda 返回 read_result{{content.data(), content.size()}, true, {}},依赖捕获的 content 生命周期。若底层发送不是“立即消费完该 span”,可能悬空;建议确认 async_upload_impl 不会跨挂起保存该 buffer,或改成持久缓冲/拷贝。
  2. :1371-1377 out_buf_ = {out_buf.data(), out_buf.size()};BodyTarget 仅靠 if constexpr 分支约束,非 SSE 路径默认要求有 data/size,模板错误信息会很差;建议加 concept/static_assert 限定。
  3. :1449-1460 SSE 将 operation_canceled 视为正常结束过于激进,可能吞掉用户主动取消/连接异常,建议只对“handler 返回 false 导致的本地取消”做特殊处理。
  4. :1490 async_sse_request(Handler &handler) 只接左值,async_get_sse(..., [](…){}) 这种右值 lambda 在 async_get_sse 内转发虽可工作,但经 &handler 持有地址,强依赖协程执行期间该局部参数存活;建议按值存 handler 或完美转发后 decay 保存。
  5. example/main.cpp:160 / README 示例里 sleep_for(200ms) 等待服务启动不稳定,CI/慢机下可能偶现失败;建议使用显式就绪同步。
  6. .gitignore:9-10 忽略 *.txt 风险很大,可能误伤文档/测试数据,建议删除或收窄到特定目录。
  7. 风格:use_sse 的 handler 未使用 req,建议去掉名称或标 [[maybe_unused]]。整体接口设计不错,但需重点确认 SSE/chunked 的 buffer 生命周期与取消语义。

@qicosmos qicosmos left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

  1. 正确性include/cinatra/coro_http_client.hpp:1371-1377
    async_requestBodyTarget 泛化后,非 SSE 分支直接调用 out_buf.data()/size()。这要求 BodyTarget 必须类 span 接口,但模板未约束,误传其他类型会产生晦涩编译错误。建议加 concept/SFINAE 约束,或拆成独立重载。

  2. 正确性/生命周期coro_http_client.hpp:1311-1321
    async_request_chunked 里 lambda 返回 read_result{{content.data(), content.size()}, ...},依赖捕获的 content 生命周期。当前看起来在协程闭包内是安全的,但若后续 async_upload_impl 改为缓存该 span 或异步跨帧使用,容易悬空。建议显式文档说明或返回拥有数据的 buffer。

  3. 正确性coro_http_client.hpp:1458-1464
    SSE 场景将 operation_canceled 视为正常结束并清空错误码,语义较危险:若取消来自用户主动中断/超时竞争,也会被吞掉,掩盖真实异常。建议仅对“handler 返回 false 导致的主动停止”做专门状态区分。

  4. 线程/资源管理example/main.cpp:163-196
    use_sse() 内部新建 coro_http_server server(1, 9001);,示例整体已多处复用 9001 端口;若前一个示例 server 未完全释放,可能端口冲突。建议复用同一 server 或显式 stop/join。

  5. 性能example/main.cpp:186-188
    SSE 回调中 events.push_back(event) 每次拷贝 sse_event,若 data 较大可考虑 emplace_back(event)(收益有限)或在接口层支持移动。

  6. 代码风格README.mdexample/main.cpp
    多处使用 std::this_thread::sleep_for(200ms) 等待 server 启动,不稳定且属于 flaky 示例。建议改为监听成功后的同步机制。

  7. 仓库配置.gitignore:9-10
    新增 *.txt 过于宽泛,可能误忽略文档、测试输入、基准结果等应提交文件;建议限定具体路径或文件名。

@github-actions

Copy link
Copy Markdown

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                        117                 0   100.00%        1850               212    88.54%         578               123    78.72%
coro_http_connection.hpp                     47                 2    95.74%         807                62    92.32%         236                35    85.17%
coro_http_request.hpp                        30                 0   100.00%         220                 4    98.18%          86                 7    91.86%
coro_http_response.hpp                       32                 1    96.88%         284                17    94.01%         114                17    85.09%
coro_http_router.hpp                         18                 0   100.00%         233                24    89.70%          32                10    68.75%
coro_http_server.hpp                         63                 1    98.41%         968               104    89.26%         238                64    73.11%
coro_radix_tree.hpp                          17                 0   100.00%         264                38    85.61%         136                28    79.41%
define.h                                      3                 0   100.00%          36                 2    94.44%          20                 1    95.00%
gzip.hpp                                      6                 2    66.67%         200                99    50.50%          52                28    46.15%
http_parser.hpp                              29                 1    96.55%         185                13    92.97%          52                 5    90.38%
mime_types.hpp                                1                 0   100.00%           7                 0   100.00%           2                 0   100.00%
multipart.hpp                                 4                 0   100.00%          91                19    79.12%          22                 6    72.73%
picohttpparser.h                             13                 5    61.54%         431               238    44.78%         212                97    54.25%
rate_limiter.hpp                              9                 4    55.56%          59                21    64.41%           6                 1    83.33%
response_cv.hpp                               2                 0   100.00%         133                98    26.32%         124                49    60.48%
session.hpp                                  12                 0   100.00%          55                 2    96.36%           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                                20                 7    65.00%         172                70    59.30%          28                 2    92.86%
uri.hpp                                      16                 0   100.00%         174                 0   100.00%         168                25    85.12%
url_encode_decode.hpp                         4                 0   100.00%          93                28    69.89%          48                16    66.67%
utils.hpp                                    16                 0   100.00%         279                28    89.96%         160                58    63.75%
websocket.hpp                                15                 4    73.33%         181                43    76.24%          78                17    78.21%
ylt/coro_io/client_pool.hpp                  21                 5    76.19%         278               132    52.52%          56                37    33.93%
ylt/coro_io/coro_file.hpp                    34                 0   100.00%         246                20    91.87%          44                18    59.09%
ylt/coro_io/coro_io.hpp                      61                 6    90.16%         407                44    89.19%          32                 9    71.88%
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              40                 7    82.50%         228                39    82.89%          28                 8    71.43%
ylt/coro_io/load_blancer.hpp                 16                 1    93.75%         112                 5    95.54%          34                 7    79.41%
ylt/metric/counter.hpp                       22                 0   100.00%         178                 4    97.75%          52                 3    94.23%
ylt/metric/dynamic_metric.hpp                15                 0   100.00%          71                 0   100.00%          12                 0   100.00%
ylt/metric/gauge.hpp                          5                 0   100.00%          18                 0   100.00%           2                 0   100.00%
ylt/metric/histogram.hpp                     15                 0   100.00%         137                 0   100.00%          28                 1    96.43%
ylt/metric/metric.hpp                        27                 0   100.00%          98                 0   100.00%          18                 1    94.44%
ylt/metric/metric_manager.hpp                58                 1    98.28%         413                16    96.13%         100                 9    91.00%
ylt/metric/summary.hpp                       12                 0   100.00%          93                 0   100.00%          18                 0   100.00%
ylt/metric/summary_impl.hpp                  23                 2    91.30%         276                40    85.51%          96                25    73.96%
ylt/metric/system_metric.hpp                 14                 0   100.00%         270                18    93.33%          20                 9    55.00%
ylt/metric/thread_local_value.hpp            12                 0   100.00%          74                 4    94.59%          16                 2    87.50%
ylt/util/concurrentqueue.h                   77                26    66.23%        1236               717    41.99%         290               198    31.72%
ylt/util/expected.hpp                        11                 4    63.64%          11                 4    63.64%           0                 0         -
ylt/util/map_sharded.hpp                     24                 0   100.00%         168                 5    97.02%          38                 6    84.21%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                      1014                88    91.32%       11442              2209    80.69%        3342               933    72.08%

@github-actions

Copy link
Copy Markdown

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                        117                 0   100.00%        1850               212    88.54%         578               123    78.72%
coro_http_connection.hpp                     47                 2    95.74%         807                66    91.82%         236                36    84.75%
coro_http_request.hpp                        30                 0   100.00%         220                 4    98.18%          86                 7    91.86%
coro_http_response.hpp                       32                 1    96.88%         284                17    94.01%         114                17    85.09%
coro_http_router.hpp                         18                 0   100.00%         233                24    89.70%          32                10    68.75%
coro_http_server.hpp                         63                 1    98.41%         968               104    89.26%         238                64    73.11%
coro_radix_tree.hpp                          17                 0   100.00%         264                38    85.61%         136                28    79.41%
define.h                                      3                 0   100.00%          36                 2    94.44%          20                 1    95.00%
gzip.hpp                                      6                 2    66.67%         200                99    50.50%          52                28    46.15%
http_parser.hpp                              29                 1    96.55%         185                13    92.97%          52                 5    90.38%
mime_types.hpp                                1                 0   100.00%           7                 0   100.00%           2                 0   100.00%
multipart.hpp                                 4                 0   100.00%          91                15    83.52%          22                 5    77.27%
picohttpparser.h                             13                 5    61.54%         431               238    44.78%         212                97    54.25%
rate_limiter.hpp                              9                 4    55.56%          59                21    64.41%           6                 1    83.33%
response_cv.hpp                               2                 0   100.00%         133                98    26.32%         124                49    60.48%
session.hpp                                  12                 0   100.00%          55                 2    96.36%           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                                20                 7    65.00%         172                72    58.14%          28                 3    89.29%
uri.hpp                                      16                 0   100.00%         174                 0   100.00%         168                25    85.12%
url_encode_decode.hpp                         4                 0   100.00%          93                28    69.89%          48                16    66.67%
utils.hpp                                    16                 0   100.00%         279                28    89.96%         160                58    63.75%
websocket.hpp                                15                 4    73.33%         181                43    76.24%          78                17    78.21%
ylt/coro_io/client_pool.hpp                  21                 5    76.19%         278               132    52.52%          56                37    33.93%
ylt/coro_io/coro_file.hpp                    34                 0   100.00%         246                20    91.87%          44                18    59.09%
ylt/coro_io/coro_io.hpp                      61                 6    90.16%         407                44    89.19%          32                 9    71.88%
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              40                 7    82.50%         228                39    82.89%          28                 8    71.43%
ylt/coro_io/load_blancer.hpp                 16                 1    93.75%         112                 5    95.54%          34                 7    79.41%
ylt/metric/counter.hpp                       22                 0   100.00%         178                 4    97.75%          52                 3    94.23%
ylt/metric/dynamic_metric.hpp                15                 0   100.00%          71                 0   100.00%          12                 0   100.00%
ylt/metric/gauge.hpp                          5                 0   100.00%          18                 0   100.00%           2                 0   100.00%
ylt/metric/histogram.hpp                     15                 0   100.00%         137                 0   100.00%          28                 1    96.43%
ylt/metric/metric.hpp                        27                 0   100.00%          98                 0   100.00%          18                 1    94.44%
ylt/metric/metric_manager.hpp                58                 1    98.28%         413                16    96.13%         100                 9    91.00%
ylt/metric/summary.hpp                       12                 0   100.00%          93                 0   100.00%          18                 0   100.00%
ylt/metric/summary_impl.hpp                  23                 2    91.30%         276                40    85.51%          96                25    73.96%
ylt/metric/system_metric.hpp                 14                 0   100.00%         270                18    93.33%          20                 9    55.00%
ylt/metric/thread_local_value.hpp            12                 0   100.00%          74                 4    94.59%          16                 2    87.50%
ylt/util/concurrentqueue.h                   77                26    66.23%        1236               717    41.99%         290               198    31.72%
ylt/util/expected.hpp                        11                 4    63.64%          11                 4    63.64%           0                 0         -
ylt/util/map_sharded.hpp                     24                 0   100.00%         168                 5    97.02%          38                 6    84.21%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                      1014                88    91.32%       11442              2211    80.68%        3342               934    72.05%

@github-actions

Copy link
Copy Markdown

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                        117                 0   100.00%        1850               212    88.54%         578               123    78.72%
coro_http_connection.hpp                     47                 2    95.74%         807                62    92.32%         236                35    85.17%
coro_http_request.hpp                        30                 0   100.00%         220                 4    98.18%          86                 7    91.86%
coro_http_response.hpp                       32                 1    96.88%         284                17    94.01%         114                17    85.09%
coro_http_router.hpp                         18                 0   100.00%         233                24    89.70%          32                10    68.75%
coro_http_server.hpp                         63                 1    98.41%         968               104    89.26%         238                64    73.11%
coro_radix_tree.hpp                          17                 0   100.00%         264                38    85.61%         136                28    79.41%
define.h                                      3                 0   100.00%          36                 2    94.44%          20                 1    95.00%
gzip.hpp                                      6                 2    66.67%         200                99    50.50%          52                28    46.15%
http_parser.hpp                              29                 1    96.55%         185                13    92.97%          52                 5    90.38%
mime_types.hpp                                1                 0   100.00%           7                 0   100.00%           2                 0   100.00%
multipart.hpp                                 4                 0   100.00%          91                15    83.52%          22                 5    77.27%
picohttpparser.h                             13                 5    61.54%         431               238    44.78%         212                97    54.25%
rate_limiter.hpp                              9                 4    55.56%          59                21    64.41%           6                 1    83.33%
response_cv.hpp                               2                 0   100.00%         133                98    26.32%         124                49    60.48%
session.hpp                                  12                 0   100.00%          55                 2    96.36%           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                                20                 7    65.00%         172                72    58.14%          28                 3    89.29%
uri.hpp                                      16                 0   100.00%         174                 0   100.00%         168                25    85.12%
url_encode_decode.hpp                         4                 0   100.00%          93                28    69.89%          48                16    66.67%
utils.hpp                                    16                 0   100.00%         279                28    89.96%         160                58    63.75%
websocket.hpp                                15                 4    73.33%         181                43    76.24%          78                17    78.21%
ylt/coro_io/client_pool.hpp                  21                 5    76.19%         278               132    52.52%          56                37    33.93%
ylt/coro_io/coro_file.hpp                    34                 0   100.00%         246                20    91.87%          44                18    59.09%
ylt/coro_io/coro_io.hpp                      61                 6    90.16%         407                44    89.19%          32                 9    71.88%
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              40                 7    82.50%         228                39    82.89%          28                 8    71.43%
ylt/coro_io/load_blancer.hpp                 16                 1    93.75%         112                 5    95.54%          34                 7    79.41%
ylt/metric/counter.hpp                       22                 0   100.00%         178                 4    97.75%          52                 3    94.23%
ylt/metric/dynamic_metric.hpp                15                 0   100.00%          71                 0   100.00%          12                 0   100.00%
ylt/metric/gauge.hpp                          5                 0   100.00%          18                 0   100.00%           2                 0   100.00%
ylt/metric/histogram.hpp                     15                 0   100.00%         137                 0   100.00%          28                 1    96.43%
ylt/metric/metric.hpp                        27                 0   100.00%          98                 0   100.00%          18                 1    94.44%
ylt/metric/metric_manager.hpp                58                 1    98.28%         413                16    96.13%         100                 9    91.00%
ylt/metric/summary.hpp                       12                 0   100.00%          93                 0   100.00%          18                 0   100.00%
ylt/metric/summary_impl.hpp                  23                 2    91.30%         276                40    85.51%          96                25    73.96%
ylt/metric/system_metric.hpp                 14                 0   100.00%         270                18    93.33%          20                 9    55.00%
ylt/metric/thread_local_value.hpp            12                 0   100.00%          74                 4    94.59%          16                 2    87.50%
ylt/util/concurrentqueue.h                   77                26    66.23%        1236               717    41.99%         290               198    31.72%
ylt/util/expected.hpp                        11                 4    63.64%          11                 4    63.64%           0                 0         -
ylt/util/map_sharded.hpp                     24                 0   100.00%         168                 5    97.02%          38                 6    84.21%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                      1014                88    91.32%       11442              2207    80.71%        3342               933    72.08%

@github-actions

Copy link
Copy Markdown

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                        117                 0   100.00%        1850               207    88.81%         578               121    79.07%
coro_http_connection.hpp                     47                 2    95.74%         807                62    92.32%         236                36    84.75%
coro_http_request.hpp                        30                 0   100.00%         220                 4    98.18%          86                 7    91.86%
coro_http_response.hpp                       32                 1    96.88%         284                17    94.01%         114                17    85.09%
coro_http_router.hpp                         18                 0   100.00%         233                24    89.70%          32                10    68.75%
coro_http_server.hpp                         63                 1    98.41%         968               104    89.26%         238                64    73.11%
coro_radix_tree.hpp                          17                 0   100.00%         264                38    85.61%         136                28    79.41%
define.h                                      3                 0   100.00%          36                 2    94.44%          20                 1    95.00%
gzip.hpp                                      6                 2    66.67%         200                99    50.50%          52                28    46.15%
http_parser.hpp                              29                 1    96.55%         185                13    92.97%          52                 5    90.38%
mime_types.hpp                                1                 0   100.00%           7                 0   100.00%           2                 0   100.00%
multipart.hpp                                 4                 0   100.00%          91                15    83.52%          22                 5    77.27%
picohttpparser.h                             13                 5    61.54%         431               238    44.78%         212                97    54.25%
rate_limiter.hpp                              9                 4    55.56%          59                21    64.41%           6                 1    83.33%
response_cv.hpp                               2                 0   100.00%         133                98    26.32%         124                49    60.48%
session.hpp                                  12                 0   100.00%          55                 2    96.36%           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                                20                 7    65.00%         172                72    58.14%          28                 3    89.29%
uri.hpp                                      16                 0   100.00%         174                 0   100.00%         168                25    85.12%
url_encode_decode.hpp                         4                 0   100.00%          93                28    69.89%          48                16    66.67%
utils.hpp                                    16                 0   100.00%         279                28    89.96%         160                58    63.75%
websocket.hpp                                15                 4    73.33%         181                43    76.24%          78                17    78.21%
ylt/coro_io/client_pool.hpp                  21                 5    76.19%         278               132    52.52%          56                37    33.93%
ylt/coro_io/coro_file.hpp                    34                 0   100.00%         246                20    91.87%          44                18    59.09%
ylt/coro_io/coro_io.hpp                      61                 6    90.16%         407                44    89.19%          32                 9    71.88%
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              40                 7    82.50%         228                39    82.89%          28                 8    71.43%
ylt/coro_io/load_blancer.hpp                 16                 1    93.75%         112                 5    95.54%          34                 7    79.41%
ylt/metric/counter.hpp                       22                 0   100.00%         178                 4    97.75%          52                 3    94.23%
ylt/metric/dynamic_metric.hpp                15                 0   100.00%          71                 0   100.00%          12                 0   100.00%
ylt/metric/gauge.hpp                          5                 0   100.00%          18                 0   100.00%           2                 0   100.00%
ylt/metric/histogram.hpp                     15                 0   100.00%         137                 0   100.00%          28                 1    96.43%
ylt/metric/metric.hpp                        27                 0   100.00%          98                 0   100.00%          18                 1    94.44%
ylt/metric/metric_manager.hpp                58                 1    98.28%         413                16    96.13%         100                 9    91.00%
ylt/metric/summary.hpp                       12                 0   100.00%          93                 0   100.00%          18                 0   100.00%
ylt/metric/summary_impl.hpp                  23                 2    91.30%         276                40    85.51%          96                25    73.96%
ylt/metric/system_metric.hpp                 14                 0   100.00%         270                18    93.33%          20                 9    55.00%
ylt/metric/thread_local_value.hpp            12                 0   100.00%          74                 4    94.59%          16                 2    87.50%
ylt/util/concurrentqueue.h                   77                26    66.23%        1236               717    41.99%         290               198    31.72%
ylt/util/expected.hpp                        11                 4    63.64%          11                 4    63.64%           0                 0         -
ylt/util/map_sharded.hpp                     24                 0   100.00%         168                 5    97.02%          38                 6    84.21%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                      1014                88    91.32%       11442              2202    80.76%        3342               932    72.11%

@github-actions

Copy link
Copy Markdown

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                        117                 0   100.00%        1850               207    88.81%         578               121    79.07%
coro_http_connection.hpp                     47                 2    95.74%         807                62    92.32%         236                36    84.75%
coro_http_request.hpp                        30                 0   100.00%         220                 4    98.18%          86                 7    91.86%
coro_http_response.hpp                       32                 1    96.88%         284                17    94.01%         114                17    85.09%
coro_http_router.hpp                         18                 0   100.00%         233                24    89.70%          32                10    68.75%
coro_http_server.hpp                         63                 1    98.41%         968               104    89.26%         238                64    73.11%
coro_radix_tree.hpp                          17                 0   100.00%         264                38    85.61%         136                28    79.41%
define.h                                      3                 0   100.00%          36                 2    94.44%          20                 1    95.00%
gzip.hpp                                      6                 2    66.67%         200                99    50.50%          52                28    46.15%
http_parser.hpp                              29                 1    96.55%         185                13    92.97%          52                 5    90.38%
mime_types.hpp                                1                 0   100.00%           7                 0   100.00%           2                 0   100.00%
multipart.hpp                                 4                 0   100.00%          91                15    83.52%          22                 5    77.27%
picohttpparser.h                             13                 5    61.54%         431               238    44.78%         212                97    54.25%
rate_limiter.hpp                              9                 4    55.56%          59                21    64.41%           6                 1    83.33%
response_cv.hpp                               2                 0   100.00%         133                98    26.32%         124                49    60.48%
session.hpp                                  12                 0   100.00%          55                 2    96.36%           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                                20                 7    65.00%         172                70    59.30%          28                 2    92.86%
uri.hpp                                      16                 0   100.00%         174                 0   100.00%         168                25    85.12%
url_encode_decode.hpp                         4                 0   100.00%          93                28    69.89%          48                16    66.67%
utils.hpp                                    16                 0   100.00%         279                28    89.96%         160                58    63.75%
websocket.hpp                                15                 4    73.33%         181                43    76.24%          78                17    78.21%
ylt/coro_io/client_pool.hpp                  21                 5    76.19%         278               132    52.52%          56                37    33.93%
ylt/coro_io/coro_file.hpp                    34                 0   100.00%         246                20    91.87%          44                18    59.09%
ylt/coro_io/coro_io.hpp                      61                 6    90.16%         407                44    89.19%          32                 9    71.88%
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              40                 7    82.50%         228                39    82.89%          28                 8    71.43%
ylt/coro_io/load_blancer.hpp                 16                 1    93.75%         112                 5    95.54%          34                 7    79.41%
ylt/metric/counter.hpp                       22                 0   100.00%         178                 4    97.75%          52                 3    94.23%
ylt/metric/dynamic_metric.hpp                15                 0   100.00%          71                 0   100.00%          12                 0   100.00%
ylt/metric/gauge.hpp                          5                 0   100.00%          18                 0   100.00%           2                 0   100.00%
ylt/metric/histogram.hpp                     15                 0   100.00%         137                 0   100.00%          28                 1    96.43%
ylt/metric/metric.hpp                        27                 0   100.00%          98                 0   100.00%          18                 1    94.44%
ylt/metric/metric_manager.hpp                58                 1    98.28%         413                16    96.13%         100                 9    91.00%
ylt/metric/summary.hpp                       12                 0   100.00%          93                 0   100.00%          18                 0   100.00%
ylt/metric/summary_impl.hpp                  23                 2    91.30%         276                40    85.51%          96                25    73.96%
ylt/metric/system_metric.hpp                 14                 0   100.00%         270                18    93.33%          20                 9    55.00%
ylt/metric/thread_local_value.hpp            12                 0   100.00%          74                 4    94.59%          16                 2    87.50%
ylt/util/concurrentqueue.h                   77                26    66.23%        1236               713    42.31%         290               196    32.41%
ylt/util/expected.hpp                        11                 4    63.64%          11                 4    63.64%           0                 0         -
ylt/util/map_sharded.hpp                     24                 0   100.00%         168                 5    97.02%          38                 6    84.21%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                      1014                88    91.32%       11442              2196    80.81%        3342               929    72.20%

@qicosmos qicosmos left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

  1. 正确性include/cinatra/coro_http_client.hpp:1460 附近,SSE 分支把 operation_canceled 视为正常结束并清空错误码,这会掩盖真实取消来源;若上层主动取消请求,可能被误判为正常 EOF。建议区分“解析器主动终止”和外部取消。

  2. 正确性/接口设计async_get_sse/async_post_sse(607, 623 行附近)Handler handler 按值传入,而 async_sse_request 又持有 Handler&/指针包装,若 handler 是重对象或不可拷贝 lambda 会有问题。建议改为转发引用 Handler&& 并用 std::forward

  3. 安全性make_body_target(81-110 行附近)对普通 out_buf 直接取 data()/size(),缺少约束;若传入非连续容器会编译期报错但错误信息差。建议加 concept/static_assert 限制为 contiguous buffer。

  4. 性能async_request_chunked(1317 行附近)把整段 std::string content 一次性作为单个 chunk 发送,这只是“使用 chunked 编码”,并不能流式降低峰值内存;README 描述易让人误解。建议注明仅编码方式变化。

  5. 代码风格example/main.cpp:165、README 示例里 req 未使用,建议去掉参数名或标记 [[maybe_unused]]

  6. 代码风格/仓库配置.gitignore 忽略 *.txt(第9行)风险很大,可能误伤文档、测试数据和基准结果文件,通常不应全局忽略。

  7. 可维护性example/main.cpp:608main 中启动多个固定端口 9001 的用例,新增 use_sse() 后更易产生端口复用/时序问题,尤其依赖 sleep_for(200ms) 不稳定。建议动态端口或统一复用 server。

@qicosmos qicosmos left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

  1. include/cinatra/coro_http_client.hpp:1469+:SSE 分支把 operation_canceled 当作正常结束并清空错误码,这会掩盖真实取消/中断,可能误报成功。建议区分“回调主动停止”和“socket/上层取消”。
  2. :1490+ async_sse_request:直接改 req_headers_["Accept"],这是 client 成员状态,若同一 client 复用发普通请求,可能泄漏到后续请求;并发下也有竞态。建议只改局部 headers
  3. :1317+ async_request_chunked:lambda 持有 content 后返回 read_result{{content.data(), content.size()}, ...},依赖异步上传实现立即消费该 span;若框架延后发送会悬空。建议明确复制/持久化策略。
  4. :1284+ async_request:新增 BodyTarget&& out_buf = {} 可读性较差,且默认 {} 对泛型推导不友好,建议保留 std::span<char> 重载,SSE 单独接口走专用实现。
  5. example/main.cpp:161+ use_sse:每个示例都新建 server(1, 9001)main 串行执行但未见显式 stop,存在端口占用/启动失败风险。
  6. README/examplesleep_for(200ms) 等待服务启动不稳定,测试易 flaky,建议用同步信号。
  7. .gitignore:9:忽略 *.txt 过宽,可能误伤文档/测试数据,不建议。

@github-actions

Copy link
Copy Markdown

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                        117                 0   100.00%        1850               197    89.35%         578               119    79.41%
coro_http_connection.hpp                     47                 2    95.74%         807                62    92.32%         236                36    84.75%
coro_http_request.hpp                        30                 0   100.00%         220                 4    98.18%          86                 7    91.86%
coro_http_response.hpp                       32                 1    96.88%         284                17    94.01%         114                17    85.09%
coro_http_router.hpp                         18                 0   100.00%         233                24    89.70%          32                10    68.75%
coro_http_server.hpp                         63                 1    98.41%         968               104    89.26%         238                64    73.11%
coro_radix_tree.hpp                          17                 0   100.00%         264                38    85.61%         136                28    79.41%
define.h                                      3                 0   100.00%          36                 2    94.44%          20                 1    95.00%
gzip.hpp                                      6                 2    66.67%         200                99    50.50%          52                28    46.15%
http_parser.hpp                              29                 1    96.55%         185                13    92.97%          52                 5    90.38%
mime_types.hpp                                1                 0   100.00%           7                 0   100.00%           2                 0   100.00%
multipart.hpp                                 4                 0   100.00%          91                15    83.52%          22                 5    77.27%
picohttpparser.h                             13                 5    61.54%         431               238    44.78%         212                97    54.25%
rate_limiter.hpp                              9                 4    55.56%          59                21    64.41%           6                 1    83.33%
response_cv.hpp                               2                 0   100.00%         133                98    26.32%         124                49    60.48%
session.hpp                                  12                 0   100.00%          55                 2    96.36%           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                                20                 7    65.00%         172                70    59.30%          28                 2    92.86%
uri.hpp                                      16                 0   100.00%         174                 0   100.00%         168                25    85.12%
url_encode_decode.hpp                         4                 0   100.00%          93                28    69.89%          48                16    66.67%
utils.hpp                                    16                 0   100.00%         279                28    89.96%         160                58    63.75%
websocket.hpp                                15                 4    73.33%         181                43    76.24%          78                17    78.21%
ylt/coro_io/client_pool.hpp                  21                 5    76.19%         278               132    52.52%          56                37    33.93%
ylt/coro_io/coro_file.hpp                    34                 0   100.00%         246                20    91.87%          44                18    59.09%
ylt/coro_io/coro_io.hpp                      61                 6    90.16%         407                44    89.19%          32                 9    71.88%
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              40                 7    82.50%         228                39    82.89%          28                 8    71.43%
ylt/coro_io/load_blancer.hpp                 16                 1    93.75%         112                 5    95.54%          34                 7    79.41%
ylt/metric/counter.hpp                       22                 0   100.00%         178                 4    97.75%          52                 3    94.23%
ylt/metric/dynamic_metric.hpp                15                 0   100.00%          71                 0   100.00%          12                 0   100.00%
ylt/metric/gauge.hpp                          5                 0   100.00%          18                 0   100.00%           2                 0   100.00%
ylt/metric/histogram.hpp                     15                 0   100.00%         137                 0   100.00%          28                 1    96.43%
ylt/metric/metric.hpp                        27                 0   100.00%          98                 0   100.00%          18                 1    94.44%
ylt/metric/metric_manager.hpp                58                 1    98.28%         413                16    96.13%         100                 9    91.00%
ylt/metric/summary.hpp                       12                 0   100.00%          93                 0   100.00%          18                 0   100.00%
ylt/metric/summary_impl.hpp                  23                 2    91.30%         276                40    85.51%          96                25    73.96%
ylt/metric/system_metric.hpp                 14                 0   100.00%         270                18    93.33%          20                 9    55.00%
ylt/metric/thread_local_value.hpp            12                 0   100.00%          74                 4    94.59%          16                 2    87.50%
ylt/util/concurrentqueue.h                   77                26    66.23%        1236               717    41.99%         290               198    31.72%
ylt/util/expected.hpp                        11                 4    63.64%          11                 4    63.64%           0                 0         -
ylt/util/map_sharded.hpp                     24                 0   100.00%         168                 5    97.02%          38                 6    84.21%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                      1014                88    91.32%       11442              2190    80.86%        3342               929    72.20%

@qicosmos qicosmos left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

  1. include/cinatra/coro_http_client.hpp:81-106make_body_target 对非 SSE 分支直接调用 out_buf.data()/size(),模板约束过宽;若调用方传入非连续容器/临时对象会直接编译失败或悬垂,建议加 requires/static_assert 限制为 contiguous buffer。

  2. coro_http_client.hpp:607-634async_get_sse/async_post_sseHandler handler 按值传递,而 async_sse_request(..., Handler &handler) 内部取地址保存。若传入临时 lambda,虽然当前协程链通常立即消费,但存在生命周期依赖,建议改为转发引用并在内部显式 std::decay_t 持有。

  3. coro_http_client.hpp:1317-1333async_request_chunkedread_result{{content.data(), content.size()}, ...} 引用 lambda 捕获的 content 内存;依赖上传实现不在协程挂起后延迟使用该 span。建议确认 async_upload_impl 不缓存该指针,否则需复制或保持稳定存储。

  4. coro_http_client.hpp:1391-1485:SSE 模式下把 operation_canceled 强行清空为成功,这会掩盖真实取消/关闭错误,影响正确性和排障。建议仅在“handler 返回 false 的主动停止”场景转换。

  5. coro_http_client.hpp:1488+async_sse_request 修改 req_headers_["Accept"],这是客户端成员状态,可能污染后续非 SSE 请求;应优先只改本次 headers,避免隐藏副作用。

  6. example/main.cpp:159-198:示例中启动 server(1, 9001) 后仅 sleep_for(200ms) 等待,测试不稳定且端口固定,易与前面示例冲突。建议使用随机端口/就绪同步。

  7. .gitignore:8-9:新增 *.txt 过于宽泛,可能误伤文档、测试数据,不建议全局忽略。

@qicosmos qicosmos left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

  1. include/cinatra/coro_http_client.hpp:1317
    async_request_chunkedsource 返回 read_result{{content.data(), content.size()}, ...},这里引用的是 lambda 内部捕获的 content 缓冲区。若底层上传逻辑异步保存该 span 而非立即消费,可能悬空。建议确认 async_upload_impl 的消费时机,必要时改为持久缓冲或分块拷贝。

  2. include/cinatra/coro_http_client.hpp:1369-1479
    async_request 拆成 async_request_impl 后,SSE 分支通过模板区分 handle_read 重载,复杂度明显上升。建议加 static_assert 或 concept 约束 BodyTarget,否则错误类型传入时编译报错可能很差。

  3. include/cinatra/coro_http_client.hpp:1391-1397
    SSE 分支直接将 out_buf_ 置空,意味着复用同一个 client 发起并发请求时仍依赖成员状态切换,线程安全/重入性风险未见改善。若 coro_http_client 允许并发使用,这里可能有竞态。

  4. include/cinatra/coro_http_client.hpp:1470-1478
    operation_canceled 在 SSE 下静默转成功过于激进,可能掩盖真实取消/断连错误。建议仅在“用户 handler 主动停止”这一可判定场景下转换。

  5. include/cinatra/coro_http_client.hpp:148x
    async_sse_request 修改 req_headers_["Accept"],会污染 client 全局默认头,影响后续非 SSE 请求。更合理的是只改本次 headers 副本。

  6. example/main.cpp:169-205
    示例里 server.async_start(); sleep_for(200ms); 依赖固定等待,测试不稳定且拖慢执行。建议使用端口就绪同步。

  7. example/main.cpp:173
    handler 未使用 req,建议去掉变量名或标 [[maybe_unused]],减少告警。

  8. .gitignore:9-10
    新增 *.txt 过宽,可能误忽略文档、测试数据和基准输出,不建议。

@github-actions

Copy link
Copy Markdown

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                        117                 0   100.00%        1850               207    88.81%         578               121    79.07%
coro_http_connection.hpp                     47                 2    95.74%         807                66    91.82%         236                35    85.17%
coro_http_request.hpp                        30                 0   100.00%         220                 4    98.18%          86                 7    91.86%
coro_http_response.hpp                       32                 1    96.88%         284                17    94.01%         114                17    85.09%
coro_http_router.hpp                         18                 0   100.00%         233                24    89.70%          32                10    68.75%
coro_http_server.hpp                         63                 1    98.41%         968               104    89.26%         238                64    73.11%
coro_radix_tree.hpp                          17                 0   100.00%         264                38    85.61%         136                28    79.41%
define.h                                      3                 0   100.00%          36                 2    94.44%          20                 1    95.00%
gzip.hpp                                      6                 2    66.67%         200                99    50.50%          52                28    46.15%
http_parser.hpp                              29                 1    96.55%         185                13    92.97%          52                 5    90.38%
mime_types.hpp                                1                 0   100.00%           7                 0   100.00%           2                 0   100.00%
multipart.hpp                                 4                 0   100.00%          91                19    79.12%          22                 6    72.73%
picohttpparser.h                             13                 5    61.54%         431               238    44.78%         212                97    54.25%
rate_limiter.hpp                              9                 4    55.56%          59                21    64.41%           6                 1    83.33%
response_cv.hpp                               2                 0   100.00%         133                98    26.32%         124                49    60.48%
session.hpp                                  12                 0   100.00%          55                 2    96.36%           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                                20                 7    65.00%         172                72    58.14%          28                 3    89.29%
uri.hpp                                      16                 0   100.00%         174                 0   100.00%         168                25    85.12%
url_encode_decode.hpp                         4                 0   100.00%          93                28    69.89%          48                16    66.67%
utils.hpp                                    16                 0   100.00%         279                28    89.96%         160                58    63.75%
websocket.hpp                                15                 4    73.33%         181                43    76.24%          78                17    78.21%
ylt/coro_io/client_pool.hpp                  21                 5    76.19%         278               132    52.52%          56                37    33.93%
ylt/coro_io/coro_file.hpp                    34                 0   100.00%         246                20    91.87%          44                18    59.09%
ylt/coro_io/coro_io.hpp                      61                 6    90.16%         407                44    89.19%          32                 9    71.88%
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              40                 7    82.50%         228                39    82.89%          28                 8    71.43%
ylt/coro_io/load_blancer.hpp                 16                 1    93.75%         112                 5    95.54%          34                 7    79.41%
ylt/metric/counter.hpp                       22                 0   100.00%         178                 4    97.75%          52                 3    94.23%
ylt/metric/dynamic_metric.hpp                15                 0   100.00%          71                 0   100.00%          12                 0   100.00%
ylt/metric/gauge.hpp                          5                 0   100.00%          18                 0   100.00%           2                 0   100.00%
ylt/metric/histogram.hpp                     15                 0   100.00%         137                 0   100.00%          28                 1    96.43%
ylt/metric/metric.hpp                        27                 0   100.00%          98                 0   100.00%          18                 1    94.44%
ylt/metric/metric_manager.hpp                58                 1    98.28%         413                16    96.13%         100                 9    91.00%
ylt/metric/summary.hpp                       12                 0   100.00%          93                 0   100.00%          18                 0   100.00%
ylt/metric/summary_impl.hpp                  23                 2    91.30%         276                40    85.51%          96                25    73.96%
ylt/metric/system_metric.hpp                 14                 0   100.00%         270                18    93.33%          20                 9    55.00%
ylt/metric/thread_local_value.hpp            12                 0   100.00%          74                 4    94.59%          16                 2    87.50%
ylt/util/concurrentqueue.h                   77                26    66.23%        1236               717    41.99%         290               198    31.72%
ylt/util/expected.hpp                        11                 4    63.64%          11                 4    63.64%           0                 0         -
ylt/util/map_sharded.hpp                     24                 0   100.00%         168                 5    97.02%          38                 6    84.21%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                      1014                88    91.32%       11442              2210    80.69%        3342               932    72.11%

@qicosmos qicosmos left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

  1. include/cinatra/coro_http_client.hpp:81-106make_body_target 对非 SSE 分支直接用 out_buf.data()/size(),要求调用方类型满足这两个接口;默认参数 BodyTarget&& out_buf = {} 对某些类型推导/编译可能不稳定,建议加 concept/static_assert 限制,避免模板报错难排查。

  2. :607-636async_get_sse/async_post_sseHandler handler 按值接收,后续 async_sse_request(..., handler, ...) 传引用。若用户传入重状态/不可拷贝 handler,会有额外拷贝或直接编译失败;建议改为转发引用。

  3. :1317-1334async_request_chunked 的 lambda 返回 read_result{{content.data(), content.size()}, true, {}},依赖 content 在异步上传期间始终存活。当前捕获值通常安全,但若底层延迟消费 span,仍有悬垂风险;最好明确 read_result 是否复制数据,或改为拥有型缓冲。

  4. :1369-1479async_request_impl 为 SSE 特判 operation_canceled 并清空错误,这会吞掉真实取消原因,可能掩盖主动取消/连接异常。建议仅在“handler 返回停止”这一明确路径映射为成功结束。

  5. :1490+async_sse_request 直接修改 req_headers_["Accept"]req_headers_ 是 client 成员,可能污染后续非 SSE 请求;建议只改本次 headers

  6. example/main.cpp:157-196:示例里 server.async_start(); sleep_for(200ms); 是脆弱同步方式,CI/慢机可能偶发失败。建议提供启动就绪信号。

  7. .gitignore:6-9:新增 *.txt 过宽,可能误忽略文档、测试输入和基准结果文件,不建议。

  8. 风格:README/example 中 SSE 示例未校验 end_sse() 返回值;错误处理不完整。

@github-actions

Copy link
Copy Markdown

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                        117                 0   100.00%        1850               207    88.81%         578               121    79.07%
coro_http_connection.hpp                     47                 2    95.74%         807                62    92.32%         236                35    85.17%
coro_http_request.hpp                        30                 0   100.00%         220                 4    98.18%          86                 7    91.86%
coro_http_response.hpp                       32                 1    96.88%         284                17    94.01%         114                17    85.09%
coro_http_router.hpp                         18                 0   100.00%         233                24    89.70%          32                10    68.75%
coro_http_server.hpp                         63                 1    98.41%         968               104    89.26%         238                64    73.11%
coro_radix_tree.hpp                          17                 0   100.00%         264                38    85.61%         136                28    79.41%
define.h                                      3                 0   100.00%          36                 2    94.44%          20                 1    95.00%
gzip.hpp                                      6                 2    66.67%         200                99    50.50%          52                28    46.15%
http_parser.hpp                              29                 1    96.55%         185                13    92.97%          52                 5    90.38%
mime_types.hpp                                1                 0   100.00%           7                 0   100.00%           2                 0   100.00%
multipart.hpp                                 4                 0   100.00%          91                19    79.12%          22                 6    72.73%
picohttpparser.h                             13                 5    61.54%         431               238    44.78%         212                97    54.25%
rate_limiter.hpp                              9                 4    55.56%          59                21    64.41%           6                 1    83.33%
response_cv.hpp                               2                 0   100.00%         133                98    26.32%         124                49    60.48%
session.hpp                                  12                 0   100.00%          55                 2    96.36%           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                                20                 7    65.00%         172                70    59.30%          28                 2    92.86%
uri.hpp                                      16                 0   100.00%         174                 0   100.00%         168                25    85.12%
url_encode_decode.hpp                         4                 0   100.00%          93                28    69.89%          48                16    66.67%
utils.hpp                                    16                 0   100.00%         279                28    89.96%         160                58    63.75%
websocket.hpp                                15                 4    73.33%         181                43    76.24%          78                17    78.21%
ylt/coro_io/client_pool.hpp                  21                 5    76.19%         278               132    52.52%          56                37    33.93%
ylt/coro_io/coro_file.hpp                    34                 0   100.00%         246                20    91.87%          44                18    59.09%
ylt/coro_io/coro_io.hpp                      61                 6    90.16%         407                44    89.19%          32                 9    71.88%
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              40                 7    82.50%         228                39    82.89%          28                 8    71.43%
ylt/coro_io/load_blancer.hpp                 16                 1    93.75%         112                 5    95.54%          34                 7    79.41%
ylt/metric/counter.hpp                       22                 0   100.00%         178                 4    97.75%          52                 3    94.23%
ylt/metric/dynamic_metric.hpp                15                 0   100.00%          71                 0   100.00%          12                 0   100.00%
ylt/metric/gauge.hpp                          5                 0   100.00%          18                 0   100.00%           2                 0   100.00%
ylt/metric/histogram.hpp                     15                 0   100.00%         137                 0   100.00%          28                 1    96.43%
ylt/metric/metric.hpp                        27                 0   100.00%          98                 0   100.00%          18                 1    94.44%
ylt/metric/metric_manager.hpp                58                 1    98.28%         413                16    96.13%         100                 9    91.00%
ylt/metric/summary.hpp                       12                 0   100.00%          93                 0   100.00%          18                 0   100.00%
ylt/metric/summary_impl.hpp                  23                 2    91.30%         276                40    85.51%          96                25    73.96%
ylt/metric/system_metric.hpp                 14                 0   100.00%         270                18    93.33%          20                 9    55.00%
ylt/metric/thread_local_value.hpp            12                 0   100.00%          74                 4    94.59%          16                 2    87.50%
ylt/util/concurrentqueue.h                   77                26    66.23%        1236               717    41.99%         290               198    31.72%
ylt/util/expected.hpp                        11                 4    63.64%          11                 4    63.64%           0                 0         -
ylt/util/map_sharded.hpp                     24                 0   100.00%         168                 5    97.02%          38                 6    84.21%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                      1014                88    91.32%       11442              2204    80.74%        3342               931    72.14%

@qicosmos qicosmos left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

  1. 正确性include/cinatra/coro_http_client.hpp:607-623async_get_sse 首次调用 async_sse_request(..., handler, headers)headers 按值传递,未 std::move;重定向分支第二次请求才 move(headers)。功能上没错,但两次请求 header 处理路径不一致,建议统一,避免后续维护出错。

  2. 正确性/生命周期include/cinatra/coro_http_client.hpp:81-1041391-1479,SSE 通过 sse_event_handler{&handler} 传裸指针。若底层异步读取在协程恢复链之外延迟执行,存在 handler 悬空风险。建议文档明确 handler 生命周期要求,或改为值/shared_ptr 持有。

  3. 安全性/状态污染include/cinatra/coro_http_client.hpp:1490-1500async_sse_requestheaders.empty() 时直接写 req_headers_["Accept"]。这会污染 client 全局状态,影响后续非 SSE 请求。应只修改本次请求 headers,避免跨请求副作用。

  4. 正确性include/cinatra/coro_http_client.hpp:1469-1479,将 SSE 下的 operation_canceled 视为正常结束并清空错误码,语义较危险:真实取消和“用户主动停止读取”被混淆,可能掩盖上层取消逻辑。建议区分用户回调主动停止与外部取消。

  5. 性能include/cinatra/coro_http_client.hpp:1317-1334async_request_chunked 对字符串 chunked 上传只发送单个 chunk,实际上比普通 Content-Length 请求多了 chunked 编码开销,收益有限。若只是一次性字符串,建议文档强调这是“协议兼容需求”而非性能优化。

  6. 代码风格example/main.cpp:168-210,示例里 req 未使用,建议去掉参数名或标记 [[maybe_unused]]

  7. 仓库配置.gitignore:9-10 忽略 *.txt 过宽,可能误伤测试数据/文档产物,建议限定到特定目录或临时文件命名。

@github-actions

Copy link
Copy Markdown

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                        117                 0   100.00%        1850               212    88.54%         578               123    78.72%
coro_http_connection.hpp                     47                 2    95.74%         807                62    92.32%         236                35    85.17%
coro_http_request.hpp                        30                 0   100.00%         220                 4    98.18%          86                 7    91.86%
coro_http_response.hpp                       32                 1    96.88%         284                17    94.01%         114                17    85.09%
coro_http_router.hpp                         18                 0   100.00%         233                24    89.70%          32                10    68.75%
coro_http_server.hpp                         63                 1    98.41%         968               104    89.26%         238                64    73.11%
coro_radix_tree.hpp                          17                 0   100.00%         264                38    85.61%         136                28    79.41%
define.h                                      3                 0   100.00%          36                 2    94.44%          20                 1    95.00%
gzip.hpp                                      6                 2    66.67%         200                99    50.50%          52                28    46.15%
http_parser.hpp                              29                 1    96.55%         185                13    92.97%          52                 5    90.38%
mime_types.hpp                                1                 0   100.00%           7                 0   100.00%           2                 0   100.00%
multipart.hpp                                 4                 0   100.00%          91                15    83.52%          22                 5    77.27%
picohttpparser.h                             13                 5    61.54%         431               238    44.78%         212                97    54.25%
rate_limiter.hpp                              9                 4    55.56%          59                21    64.41%           6                 1    83.33%
response_cv.hpp                               2                 0   100.00%         133                98    26.32%         124                49    60.48%
session.hpp                                  12                 0   100.00%          55                 2    96.36%           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                                20                 7    65.00%         172                70    59.30%          28                 2    92.86%
uri.hpp                                      16                 0   100.00%         174                 0   100.00%         168                25    85.12%
url_encode_decode.hpp                         4                 0   100.00%          93                28    69.89%          48                16    66.67%
utils.hpp                                    16                 0   100.00%         279                28    89.96%         160                58    63.75%
websocket.hpp                                15                 4    73.33%         181                43    76.24%          78                17    78.21%
ylt/coro_io/client_pool.hpp                  21                 5    76.19%         278               132    52.52%          56                37    33.93%
ylt/coro_io/coro_file.hpp                    34                 0   100.00%         246                20    91.87%          44                18    59.09%
ylt/coro_io/coro_io.hpp                      61                 6    90.16%         407                44    89.19%          32                 9    71.88%
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              40                 7    82.50%         228                39    82.89%          28                 8    71.43%
ylt/coro_io/load_blancer.hpp                 16                 1    93.75%         112                 5    95.54%          34                 7    79.41%
ylt/metric/counter.hpp                       22                 0   100.00%         178                 4    97.75%          52                 3    94.23%
ylt/metric/dynamic_metric.hpp                15                 0   100.00%          71                 0   100.00%          12                 0   100.00%
ylt/metric/gauge.hpp                          5                 0   100.00%          18                 0   100.00%           2                 0   100.00%
ylt/metric/histogram.hpp                     15                 0   100.00%         137                 0   100.00%          28                 1    96.43%
ylt/metric/metric.hpp                        27                 0   100.00%          98                 0   100.00%          18                 1    94.44%
ylt/metric/metric_manager.hpp                58                 1    98.28%         413                16    96.13%         100                 9    91.00%
ylt/metric/summary.hpp                       12                 0   100.00%          93                 0   100.00%          18                 0   100.00%
ylt/metric/summary_impl.hpp                  23                 2    91.30%         276                40    85.51%          96                25    73.96%
ylt/metric/system_metric.hpp                 14                 0   100.00%         270                18    93.33%          20                 9    55.00%
ylt/metric/thread_local_value.hpp            12                 0   100.00%          74                 4    94.59%          16                 2    87.50%
ylt/util/concurrentqueue.h                   77                26    66.23%        1236               717    41.99%         290               198    31.72%
ylt/util/expected.hpp                        11                 4    63.64%          11                 4    63.64%           0                 0         -
ylt/util/map_sharded.hpp                     24                 0   100.00%         168                 5    97.02%          38                 6    84.21%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                      1014                88    91.32%       11442              2205    80.73%        3342               932    72.11%

@qicosmos qicosmos left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

  1. .gitignore:新增 *.txt(约第9行)风险很大,会误忽略文档、测试输入/输出、配置模板等文本文件。建议改为更具体的路径或文件名模式。
  2. README/example:标题是“support sse”,但示例里 chunked request 也改了,PR 标题与变更范围不符。
  3. coro_http_client.hpp:81-106make_body_target 对非 SSE 分支直接用 out_buf.data()/size(),若传入类型不满足 contiguous buffer 约束会模板报错,建议加 concept/static_assert 限制。
  4. async_get_sse/async_post_sse(约607+)Handler handler 按值传递,后续 async_sse_request(..., Handler& handler, ...) 取引用。若回调不可拷贝/持有状态,可能有额外拷贝和语义偏差;建议完美转发。
  5. async_request_chunked(约1317+):lambda 捕获整个 content 再返回 string_view 风格数据,当前协程流程下大概率安全,但强依赖 async_upload_impl 不延迟保存该指针;建议明确文档或改为拥有型 buffer,避免悬垂风险。
  6. async_request/async_request_impl(约1369+):为支持 SSE 拆成两层是对的,但 out_buf_ 是成员状态,client 若并发复用可能互相覆盖;新增 SSE 路径也继承了这个线程安全问题,建议明确“单请求复用”限制或做请求级隔离。
  7. async_request_impl(约1469+):把 operation_canceled 在 SSE 路径下吞掉并转成成功,语义较危险,可能掩盖真实取消/连接异常。至少应区分“用户主动停止消费”和“底层 I/O 取消”。
  8. 示例 use_sse():固定 sleep_for(200ms) 等服务启动不可靠,CI/慢机下易 flaky。建议使用端口就绪检测。
  9. 代码风格coro_http_request& req 未使用(example/README),建议去掉变量名或标记 [[maybe_unused]]

整体看功能方向合理,但需要重点确认 SSE 取消语义chunked 字符串上传的生命周期安全

@github-actions

Copy link
Copy Markdown

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                        117                 0   100.00%        1850               207    88.81%         578               121    79.07%
coro_http_connection.hpp                     47                 2    95.74%         807                62    92.32%         236                35    85.17%
coro_http_request.hpp                        30                 0   100.00%         220                 4    98.18%          86                 7    91.86%
coro_http_response.hpp                       32                 1    96.88%         284                17    94.01%         114                17    85.09%
coro_http_router.hpp                         18                 0   100.00%         233                24    89.70%          32                10    68.75%
coro_http_server.hpp                         63                 1    98.41%         968               104    89.26%         238                64    73.11%
coro_radix_tree.hpp                          17                 0   100.00%         264                38    85.61%         136                28    79.41%
define.h                                      3                 0   100.00%          36                 2    94.44%          20                 1    95.00%
gzip.hpp                                      6                 2    66.67%         200                99    50.50%          52                28    46.15%
http_parser.hpp                              29                 1    96.55%         185                13    92.97%          52                 5    90.38%
mime_types.hpp                                1                 0   100.00%           7                 0   100.00%           2                 0   100.00%
multipart.hpp                                 4                 0   100.00%          91                15    83.52%          22                 5    77.27%
picohttpparser.h                             13                 5    61.54%         431               238    44.78%         212                97    54.25%
rate_limiter.hpp                              9                 4    55.56%          59                21    64.41%           6                 1    83.33%
response_cv.hpp                               2                 0   100.00%         133                98    26.32%         124                49    60.48%
session.hpp                                  12                 0   100.00%          55                 2    96.36%           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                                20                 7    65.00%         172                70    59.30%          28                 2    92.86%
uri.hpp                                      16                 0   100.00%         174                 0   100.00%         168                25    85.12%
url_encode_decode.hpp                         4                 0   100.00%          93                28    69.89%          48                16    66.67%
utils.hpp                                    16                 0   100.00%         279                28    89.96%         160                58    63.75%
websocket.hpp                                15                 4    73.33%         181                43    76.24%          78                17    78.21%
ylt/coro_io/client_pool.hpp                  21                 5    76.19%         278               132    52.52%          56                37    33.93%
ylt/coro_io/coro_file.hpp                    34                 0   100.00%         246                20    91.87%          44                18    59.09%
ylt/coro_io/coro_io.hpp                      61                 6    90.16%         407                44    89.19%          32                 9    71.88%
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              40                 7    82.50%         228                39    82.89%          28                 8    71.43%
ylt/coro_io/load_blancer.hpp                 16                 1    93.75%         112                 5    95.54%          34                 7    79.41%
ylt/metric/counter.hpp                       22                 0   100.00%         178                 4    97.75%          52                 3    94.23%
ylt/metric/dynamic_metric.hpp                15                 0   100.00%          71                 0   100.00%          12                 0   100.00%
ylt/metric/gauge.hpp                          5                 0   100.00%          18                 0   100.00%           2                 0   100.00%
ylt/metric/histogram.hpp                     15                 0   100.00%         137                 0   100.00%          28                 1    96.43%
ylt/metric/metric.hpp                        27                 0   100.00%          98                 0   100.00%          18                 1    94.44%
ylt/metric/metric_manager.hpp                58                 1    98.28%         413                16    96.13%         100                 9    91.00%
ylt/metric/summary.hpp                       12                 0   100.00%          93                 0   100.00%          18                 0   100.00%
ylt/metric/summary_impl.hpp                  23                 2    91.30%         276                40    85.51%          96                25    73.96%
ylt/metric/system_metric.hpp                 14                 0   100.00%         270                18    93.33%          20                 9    55.00%
ylt/metric/thread_local_value.hpp            12                 0   100.00%          74                 4    94.59%          16                 2    87.50%
ylt/util/concurrentqueue.h                   77                26    66.23%        1236               713    42.31%         290               196    32.41%
ylt/util/expected.hpp                        11                 4    63.64%          11                 4    63.64%           0                 0         -
ylt/util/map_sharded.hpp                     24                 0   100.00%         168                 5    97.02%          38                 6    84.21%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                      1014                88    91.32%       11442              2196    80.81%        3342               928    72.23%

@qicosmos qicosmos left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

整体方向可以,但有几处风险:

  1. 正确性
  • include/cinatra/coro_http_client.hpp:1460+:SSE 分支把 operation_canceled 视为正常结束并清空错误码,这会掩盖真实取消/连接异常,建议只对“用户回调主动停止”使用专用状态区分。
  • include/cinatra/coro_http_client.hpp:1317+async_request_chunked 的 lambda 返回 content.data(),依赖 content 捕获存活到上传完成;当前看似安全,但若底层异步缓存该 span 超过本次 co_return 生命周期会悬空,建议明确复制或文档约束。
  • example/main.cpp:170:SSE server 启动后 sleep_for(200ms) 等待监听,不稳定,CI/慢机上可能偶现失败,建议用就绪同步。
  1. 性能
  • include/...:1284+async_request 新增 BodyTarget 后,SSE/非 SSE 走 async_request_impl,模板分支增多,可接受;但 headers 仍按值传递,多次重定向/转发会额外拷贝,建议统一右值转发。
  • example/main.cpp:190:SSE 回调里 events.push_back(event) 可能多次拷贝,若事件大可考虑 emplace_back/move。
  1. 安全性
  • README.mdexample/main.cpp 的 SSE 示例未体现客户端断开后的资源清理/循环发送场景,真实使用中需避免长连接无限占用。
  • .gitignore:8:新增 *.txt 过于宽泛,可能误忽略测试数据、文档或基准输出文件。
  1. 代码风格
  • example/main.cpp:161req 未使用,建议去掉参数名或标记 [[maybe_unused]]
  • README/示例里 SSE 和 chunked API 命名清晰,但建议补充 async_post_sse 与重定向行为说明。

另外,diff 被截断,async_sse_request 后半段和 handle_read 改动未展示,SSE 解析正确性暂无法完整确认。

@github-actions

Copy link
Copy Markdown

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                        117                 0   100.00%        1850               207    88.81%         578               121    79.07%
coro_http_connection.hpp                     47                 2    95.74%         807                62    92.32%         236                35    85.17%
coro_http_request.hpp                        30                 0   100.00%         220                 4    98.18%          86                 7    91.86%
coro_http_response.hpp                       32                 1    96.88%         284                17    94.01%         114                17    85.09%
coro_http_router.hpp                         18                 0   100.00%         233                24    89.70%          32                10    68.75%
coro_http_server.hpp                         63                 1    98.41%         968               104    89.26%         238                64    73.11%
coro_radix_tree.hpp                          17                 0   100.00%         264                38    85.61%         136                28    79.41%
define.h                                      3                 0   100.00%          36                 2    94.44%          20                 1    95.00%
gzip.hpp                                      6                 2    66.67%         200                99    50.50%          52                28    46.15%
http_parser.hpp                              29                 1    96.55%         185                13    92.97%          52                 5    90.38%
mime_types.hpp                                1                 0   100.00%           7                 0   100.00%           2                 0   100.00%
multipart.hpp                                 4                 0   100.00%          91                15    83.52%          22                 5    77.27%
picohttpparser.h                             13                 5    61.54%         431               238    44.78%         212                97    54.25%
rate_limiter.hpp                              9                 4    55.56%          59                21    64.41%           6                 1    83.33%
response_cv.hpp                               2                 0   100.00%         133                98    26.32%         124                49    60.48%
session.hpp                                  12                 0   100.00%          55                 2    96.36%           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                                20                 7    65.00%         172                70    59.30%          28                 2    92.86%
uri.hpp                                      16                 0   100.00%         174                 0   100.00%         168                25    85.12%
url_encode_decode.hpp                         4                 0   100.00%          93                28    69.89%          48                16    66.67%
utils.hpp                                    16                 0   100.00%         279                28    89.96%         160                58    63.75%
websocket.hpp                                15                 4    73.33%         181                43    76.24%          78                17    78.21%
ylt/coro_io/client_pool.hpp                  21                 5    76.19%         278               132    52.52%          56                37    33.93%
ylt/coro_io/coro_file.hpp                    34                 0   100.00%         246                20    91.87%          44                18    59.09%
ylt/coro_io/coro_io.hpp                      61                 6    90.16%         407                44    89.19%          32                 9    71.88%
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              40                 7    82.50%         228                39    82.89%          28                 8    71.43%
ylt/coro_io/load_blancer.hpp                 16                 1    93.75%         112                 5    95.54%          34                 7    79.41%
ylt/metric/counter.hpp                       22                 0   100.00%         178                 4    97.75%          52                 3    94.23%
ylt/metric/dynamic_metric.hpp                15                 0   100.00%          71                 0   100.00%          12                 0   100.00%
ylt/metric/gauge.hpp                          5                 0   100.00%          18                 0   100.00%           2                 0   100.00%
ylt/metric/histogram.hpp                     15                 0   100.00%         137                 0   100.00%          28                 1    96.43%
ylt/metric/metric.hpp                        27                 0   100.00%          98                 0   100.00%          18                 1    94.44%
ylt/metric/metric_manager.hpp                58                 1    98.28%         413                16    96.13%         100                 9    91.00%
ylt/metric/summary.hpp                       12                 0   100.00%          93                 0   100.00%          18                 0   100.00%
ylt/metric/summary_impl.hpp                  23                 2    91.30%         276                40    85.51%          96                25    73.96%
ylt/metric/system_metric.hpp                 14                 0   100.00%         270                18    93.33%          20                 9    55.00%
ylt/metric/thread_local_value.hpp            12                 0   100.00%          74                 4    94.59%          16                 2    87.50%
ylt/util/concurrentqueue.h                   77                26    66.23%        1236               717    41.99%         290               198    31.72%
ylt/util/expected.hpp                        11                 4    63.64%          11                 4    63.64%           0                 0         -
ylt/util/map_sharded.hpp                     24                 0   100.00%         168                 5    97.02%          38                 6    84.21%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                      1014                88    91.32%       11442              2200    80.77%        3342               930    72.17%

@qicosmos
qicosmos merged commit 12b8887 into master Apr 28, 2026
22 checks passed
@qicosmos
qicosmos deleted the support_sse branch April 28, 2026 13:15
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.

1 participant