Blue sky: separate coverage reports for unit test + benchmarks
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- C++
- Star
- 74
- Fork
- 9
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Xem xét công việc benchmark được mô tả trong issue #61 cùng với việc báo cáo coverage hiện có của unit test và tài liệu về flags của Codecov. Xác định các lần tải lên coverage riêng biệt cho unit test và các script benchmark, sau đó xác minh rằng Codecov hiển thị hai báo cáo một cách độc lập.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- cpp
- Lĩnh vực
- performance, testing
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100