Java: test GeneratedVsManualCoverage query on top 500 JDK APIs#12680
Java: test GeneratedVsManualCoverage query on top 500 JDK APIs#12680jcogs33 merged 10 commits intogithub:mainfrom
Conversation
7a62b62 to
0688fa6
Compare
There was a problem hiding this comment.
Mostly looks plausible to me.
OOI, why are the stubs in query-tests instead of stubs? And why do we need JDK stubs in the first place?
but it seems that I can't import
utils.modelgenerator.internal.CaptureModelsin that directory
Yes, that's because utils is under src, and you can import lib modules in src, but not the other way around.
In order to test the query on the top-500 JDK APIs, I needed a database containing those top-500 APIs as callables (since the query is database-dependent and counts APIs as callables). So the stubs are not really being used as stubs here, but rather as the code that the query is being tested against. Let me know if you have a better idea regarding how to set this test case up. 😄
Ah, sorry, my question wasn't clear; I knew the issue was because |
Ah, I see! Thanks for the clarification. I was a bit misled by the name, but they are stubs, so it makes sense. The alternative would be adding code that makes all those calls so that they are extracted, which seems equally bothersome, so I think it's good as it is 😄.
It looks okay to me. The only thing we should keep in mind is that |
Would storing Or would it make sense to at least put an |
Ah, then I think I slightly favor having it in |
Moved in b534f40. Also, I renamed the stubs directory to just |
Description
This PR updates the metrics query that was originally added in #11585 to run on a specified subset of APIs and adds a test case for the top JDK APIs.
Consideration
Let me know if there's a better place to put the
TopJdkApis.qllandGeneratedVsManualCoverageQuery.qllfiles. I wanted to put them both in thelibdirectory, but it seems that I can't importutils.modelgenerator.internal.CaptureModelsin that directory, so I've leftGeneratedVsManualCoverageQuery.qllin the../src/Metrics/Summariesdirectory for now.