Changes between Version 6 and Version 7 of Dependency/Functions
- Timestamp:
- Apr 17, 2012, 2:56:37 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Dependency/Functions
v6 v7 27 27 that the program is going to look for loops on the given level, and returns with the path of the cycles. \\ 28 28 29 If one wants to have a more visual view of the dependencies, there is the ''draw'' option. This will generate a ''.dot'' file, which latter can be converted to a desired image file format. Since in the case of a vast database, the generated picture of dependencies can be very complex and hard to figure out, there are different options how the user can narrow down the result, and get a more easier understandable view. For instance, it is possible just to receive an image of the graph which contains only the cycles, or to exclude the OTP modules from the result. \\ 29 If one wants to have a more visual view of the dependencies, there is the ''draw'' option. This will generate a ''.dot'' file, which latter can be converted to a desired image file format. The following picture will show us an example on function level: 30 31 [[Image(dep_fun_before.png, 700px)]] 32 33 This illustration shows the functions with their modules and the function calls made from one function to 34 another. With red edges, it is easy to spot the cycles. Using tooltips more information can be gained. Everything related to the representation is explained later, in the wiki:Dependency/Functions#Representation section. 35 36 37 Since in the case of a vast database, the generated picture of dependencies can be very complex and hard to figure out, there are different options how the user can narrow down the result, and get a more easier understandable view. For instance, it is possible just to receive an image of the graph which contains only the cycles, or to exclude the OTP modules from the result. \\ 30 38 In every dependency option there is the opportunity to run the examination from a given function/module or a list of them. 31 39 … … 123 131 ri:print_dep([{level, func}, {type, cycles}]). 124 132 125 126 6 cycle(s),127 133 [['foo:fv4/1','foo:fv4/1'], 128 134 ['test3:p/1','test:fv6/1','test3:p/1'], … … 138 144 ri:print_dep([{level, func}, {type, all}]). 139 145 140 "6 cycle(s)",146 {"6 cycle(s)", 141 147 {[[{'$gn',func,28},{'$gn',func,28}], 142 148 [{'$gn',func,29},{'$gn',func,37},{'$gn',func,29}], … … 166 172 === Function Level === 167 173 Let's take an example to explain the meaning of the representation of 168 dependency graphs. A {{{ri:draw_dep([{level, func}, {type, all}])}}} 174 dependency graphs, and work with the example shown in the beginning of the page. 175 A 176 {{{#!erlang 177 ri:draw_dep([{level, func}, {type, all}]) 178 }}} 169 179 call was made, which generated a ''Graphviz dot file''. \\ 170 180 … … 183 193 184 194 185 The next figure was made after a {{{ri:anal_dyn()}}} was run, which is a dynamic analyser. Due to its work the call graph changes a bit, 195 The next figure was made after a 196 {{{#!erlang 197 ri:anal_dyn() 198 }}} 199 was run, which is a dynamic analyser. Due to its work the call graph changes a bit, 186 200 new types of nodes and edges are introduced. 187 201