mapbox / mapbox/node-cpp-skel

Blue sky: separate coverage reports for unit test + benchmarks

未關閉
#62 0 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
C++
星號
74
分支
9
PR 合併指標
30 天內沒有已合併 PR

描述

## Context

We use https://codecov.io for online reports of code coverage. We consider code coverage a critical tool in ensuring robust code since it:

- Allows you to quickly see what code is actually run in your tests (to help find either dead code or code needing tests)
- Helps you be motivated to write tests
- Coverage shows how many times code is executed, by line: this can be a really helpful indication of where performance bottlenecks might be.

Currently we have coverage reporting available, by file and by line, that reflects just one metric: what code was executed when running the unit tests. This is viewable at https://codecov.io/gh/mapbox/node-cpp-skel/tree/620a268920ca47ca3bc49dd96fd8839e80774411/src.

## Opportunity

@GretaCB is working on benchmarking scripts in #61. While the current code coverage answers the question of "what code do I have unit tests for?" it could also be useful, after #61 lands, to answer the question of "what code do I have benchmarks for?".

If the answer were: "only for some of the performance critical code and not all the performance critical code" **_then we have a problem_**. One of the easiest mistakes to make in performance optimization is to spend time optimizing the wrong thing. Performance optimization is hard enough when you are focused on the right code. So we should use all the tools we have to try to avoid this issue.

## Solution

Codecov has a feature called `flags`. This allows you to mark a specific coverage upload by name. We could use this to provide display of coverage isolated to our unit tests vs our benchmark scripts. See more at https://docs.codecov.io/docs/flags

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

結合現有的單元測試涵蓋率報告和 Codecov 的 flags 文件,審查 issue #61 中描述的基準測試工作。為單元測試和基準測試腳本分別定義涵蓋率上傳,然後驗證 Codecov 是否獨立顯示這兩份報告。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
cpp
領域
performance, testing
Issue 類型
功能
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。