Skip to content

Conversation

@scintiller
Copy link
Contributor

Summary: Update README.md in oss, provide more examples, start from the most common use to specified use. Make README.md be more friendly and more specific.

Test Plan: README.md doesn't need test.

Differential Revision: D23420203

yujunzhao@devvm1621.atn0.facebook.com and others added 6 commits August 31, 2020 11:24
…pytorch#43800)

Summary:
Pull Request resolved: pytorch#43800

1. Move fbcode related coverage code to fb/ folder and add TARGETS so that we can use buck run to run the tool and solved the import probelm.

2. Write `README.md` to give users guidance about the tool

Test Plan:
On devserver:
```
buck run //caffe2/fb/code_coverage/tool:coverage -- //caffe2/c10:
```

More examples in README.md

Differential Revision: D23404988

fbshipit-source-id: e41791d42ddade79c2dc35b085245558ed9be63b
Summary:
Check the result of GCC coverage in OSS is reasonable and ready to ship.

The amount of executable lines are not the same between `gcc` and `clang` because of the following reasons:
* Lines following are counted in `clang` but not in `gcc`:
1. empty line or line with only “{” or “}”
3. some comments are counted in clang but not in gcc
5. `#define ...` -- not supported by gcc according to official documentation

* Besides, a statement that explains to more than one line will be counted as only one executable line in gcc, but several lines in clang

## Advantage of `gcc` coverage
1. Much faster
- code coverage tool runtime is onle **4 min** (*ammazzzing!!*) by `gcc`, compared to **3 hours!!** by `clang`, to analyze all the tests' artifacts
2. Use less disk
- `Clang`'s artifacts will take as large as 170G, but `GCC` is 980M

Besides, also update `README.md`.

Test Plan:
Compare the result in OSS `clang` and OSS `gcc` with the same command:
```
python oss_coverage.py --run-only atest test_nn.py --interested-folder=aten
```

----

# GCC
**Summary**
> time: 0:15:45
summary percentage: 44.85%

**Report and Log**
[File Coverage Report](P140825162)
[Line Coverage Report](P140825196)
[Log](P140825385)

------

# CLANG

**Summary**
> time: 0:21:35
summary percentage: 44.08%

**Report and Log**
[File Coverage Report](P140825845)
[Line Coverage Report](P140825923)
[Log](P140825950)

Differential Revision: D23416772

fbshipit-source-id: a2993cd87c42516638f40bf9f3cec4bb8cf5e45e
…onsistent with other arguments

Summary: 1. rename input argunment `interested-folder` to `interest-only` -- be consistent with `run-only`, `coverage-only` and be shorted

Test Plan: Test on devserver and linux docker.

Differential Revision: D23417338

fbshipit-source-id: 51c609e9cb319253a4ffec3e32db2371c1714c69
Summary: set `gcc` as default compiler type in oss, and `clang` as default compiler type in fbcode

Differential Revision: D23420034

fbshipit-source-id: ab0b18a56cd9882e47408a2225728e36c011c89a
Summary: Set default pytorch folder since now we know the tool is located in `pytorch/tools/code_coverage`. Ease user's burden to set it themself.

Test Plan: Test locally

Differential Revision: D23420162

fbshipit-source-id: 6896e87837e8639cd7b84a3b34fa748696e1cab3
Summary: Update `README.md` in oss, provide more examples, start from the most common use to specified use. Make `README.md` be more friendly and more specific.

Test Plan: `README.md` doesn't need test.

Differential Revision: D23420203

fbshipit-source-id: 9c15179dedfd19fb81bc2c6b9f8990c8b3ca8b2e
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D23420203

@dr-ci
Copy link

dr-ci bot commented Aug 31, 2020

💊 CI failures summary and remediations

As of commit a4fab86 (more details on the Dr. CI page):


  • 1/7 failures possibly* introduced in this PR
    • 1/1 non-CircleCI failure(s)
  • 6/7 broken upstream at merge base 1390cad on Aug 31 from 10:12am to 12:18pm PDT (16 commits; eb4199b - f7bae5b)

🚧 6 fixed upstream failures:

These were probably caused by upstream breakages that were already fixed.

Please rebase on the viable/strict branch (expand for instructions)

If your commit is newer than viable/strict, you can try basing on an older, stable commit:

git fetch https://github.com/pytorch/pytorch viable/strict
git rebase --onto FETCH_HEAD $(git merge-base origin/master HEAD)

If your commit is older than viable/strict:

git fetch https://github.com/pytorch/pytorch viable/strict
git rebase FETCH_HEAD

Check out the recency history of this "viable master" tracking branch.


Extra GitHub checks: 1 failed


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 9 times.

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 93fbbaa.

1 similar comment
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 93fbbaa.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants