Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asynchronous extractor module #741

Merged
merged 22 commits into from
Jun 10, 2020
Merged

Asynchronous extractor module #741

merged 22 commits into from
Jun 10, 2020

Conversation

Niraj-Kamdar
Copy link
Contributor

I have converted every I/O functions into async and I have also kept sync counterpart of some otherwise it will break CI. This sync function will eventually get removed once every module will become asynchronous.

@codecov-commenter
Copy link

codecov-commenter commented Jun 9, 2020

Codecov Report

Merging #741 into master will decrease coverage by 8.01%.
The diff coverage is 61.03%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #741      +/-   ##
==========================================
- Coverage   87.71%   79.69%   -8.02%     
==========================================
  Files          76       76              
  Lines        2173     2241      +68     
  Branches      264      269       +5     
==========================================
- Hits         1906     1786     -120     
- Misses        208      390     +182     
- Partials       59       65       +6     
Flag Coverage Δ
#longtests 79.69% <61.03%> (-8.02%) ⬇️
Impacted Files Coverage Δ
cve_bin_tool/extractor.py 55.14% <46.25%> (-8.96%) ⬇️
test/test_extractor.py 74.50% <56.75%> (ø)
cve_bin_tool/util.py 89.53% <97.29%> (+5.22%) ⬆️
cve_bin_tool/cvedb.py 52.17% <0.00%> (-31.11%) ⬇️
test/test_json.py 61.76% <0.00%> (-29.42%) ⬇️
cve_bin_tool/checkers/xml2.py 61.36% <0.00%> (-27.28%) ⬇️
test/test_cli.py 81.73% <0.00%> (-18.27%) ⬇️
test/test_scanner.py 81.42% <0.00%> (-10.00%) ⬇️
cve_bin_tool/cli.py 85.54% <0.00%> (-6.03%) ⬇️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1f39bd3...2df5850. Read the comment docs.

await aio_rmdir(self.tempdir)

def extract(self, filename):
aws = asyncio.gather(self.aio_extract(filename))
Copy link
Member

Choose a reason for hiding this comment

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

Why the use of gather here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am using ensure_future now.

@pdxjohnny pdxjohnny merged commit 21903dc into intel:master Jun 10, 2020
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.

3 participants