Co-authored-by: Taus <tausbn@github.com>
This commit is contained in:
Rasmus Wriedt Larsen 2020-09-07 14:59:07 +02:00 коммит произвёл GitHub
Родитель e0016f6c52
Коммит fb37330f5e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -4,7 +4,7 @@ also known as _call graph tracing_.
Execute a python program and for each call being made, record the call and callee. This allows us to compare call graph resolution from static analysis with actual data -- that is, can we statically determine the target of each actual call correctly.
Using the call graph tracer does incur heave toll on the performance. Expect 10x longer to execute program.
Using the call graph tracer does incur a heavy toll on the performance. Expect 10x longer to execute the program.
Number of calls recorded vary a little from run to run. I have not been able to pinpoint why.
@ -25,7 +25,7 @@ $ head -n 100 projects/*/Metrics.txt
### Expanding set of projects
It should be fairly straight forward to expand the set of projects. Most projects use `tox` for running their tests against multiple python versions. I didn't look into any kind of integration, but have manually picked out the instructions required to get going.
It should be fairly straightforward to expand the set of projects. Most projects use `tox` for running their tests against multiple python versions. I didn't look into any kind of integration, but have manually picked out the instructions required to get going.
As an example, compare the [`tox.ini`](https://github.com/pallets/flask/blob/21c3df31de4bc2f838c945bd37d185210d9bab1a/tox.ini) file from flask with the configuration

Просмотреть файл

@ -179,7 +179,7 @@ class IdentifiedRecordedCall extends XMLRecordedCall {
// - all these calls were recorded
//
// without this `strictcount`, in the case `func(); func(); func()`, if 1 of the calls
// is not recorded, we woulld still mark the other two recorded calls as valid
// is not recorded, we would still mark the other two recorded calls as valid
// (which is not following the rules above). + 1 to count `this` as well.
strictcount(this.getACall()) = strictcount(this.getOtherWithSameSetOfCalls()) + 1 and
forex(XMLRecordedCall rc | rc = this.getOtherWithSameSetOfCalls() |

Просмотреть файл

@ -1,6 +1,6 @@
import lib.RecordedCalls
// colum i is just used for sorting
// column i is just used for sorting
from string text, float number, float ratio, int i
where
exists(int all_rcs | all_rcs = count(XMLRecordedCall rc) and ratio = number / all_rcs |