mapbox / mapbox/node-cpp-skel

Blue sky: separate coverage reports for unit test + benchmarks

オープン
#62 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
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. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

issue #61 に記載されているベンチマーク作業を、既存のユニットテストのカバレッジレポートおよび Codecov の flags ドキュメントと併せて確認します。ユニットテストとベンチマークスクリプト用に個別のカバレッジアップロードを定義し、Codecov が 2 つのレポートを独立して表示することを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
cpp
領域
performance, testing
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。