MCPcopy Create free account
hub / github.com/ChunelFeng/CGraph / tutorial_aspect

Function tutorial_aspect

python/tutorial/T09-Aspect.py:16–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14
15
16def tutorial_aspect():
17 a, b1, b2, c = MyNode1(), MyNode2('nodeB1'), MyNode1('nodeB2'), MyNode2()
18 b_cluster = GCluster([b1, b2])
19
20 a.addGAspect(MyTimerAspect())
21 b_cluster.addGAspect(MyTimerAspect())
22
23 pipeline = GPipeline()
24 pipeline.registerGElement(a, set(), 'nodeA')
25 pipeline.registerGElement(b_cluster, {a}, 'regionB')
26 pipeline.registerGElement(c, {b_cluster}, 'nodeC')
27 pipeline.process()
28
29
30if __name__ == '__main__':

Callers 1

T09-Aspect.pyFile · 0.70

Calls 5

processMethod · 0.95
MyNode1Class · 0.90
MyNode2Class · 0.90
MyTimerAspectClass · 0.90
GPipelineClass · 0.85

Tested by

no test coverage detected