Added calculation for afferent coupling of types#757
Added calculation for afferent coupling of types#757kmkristof wants to merge 4 commits intoEricsson:masterfrom
Conversation
|
@kmkristof Since the development of this new metric was started after Implementation of C++ metrics parallelization (see #734) was merged, I suggest to implement this metric with multithread computation on the first attempt, based on the already implemented pattern. We can consider this task as Level: Intermediate (3) with this added complexity. |
| for (const model::CppMemberType& member : _ctx.db->query<model::CppMemberType>( | ||
| odb::query<cc::model::CppMemberType>::typeHash == type.entityHash && | ||
| odb::query<cc::model::CppMemberType>::kind == model::CppMemberType::Kind::Field)) | ||
| { | ||
| typesFound.insert(member.memberTypeHash); | ||
| } |
There was a problem hiding this comment.
My current solution is not complete. This coupling is not only defined by member fields but also by function parameters, inheritance relations etc. Please complement this calculation accordingly.
intjftw
left a comment
There was a problem hiding this comment.
Testing with TinyXML2, the records in the db contain 0 for the AST node ID for afferent coupling. Another issue is that all afferent coupling records are persisted multiple times (or at least I think I'm discovering a pattern in the data, but the same series of stored metrics seem to be duplicated several times). Also, the afferent metrics are not present in the service component.
|
Superseded by #780. |
Closes #671
I added a calculation for the type level afferent coupling metric based on @intjftw's solution in #711.
TODO: