Beispiel #1
0
def profilingContext(roots):
    context = ProfilingContext()
    context.nodes = nodes
    context.methods = methods.values()
    context.classes = classes.values()
    context.exceptions = exceptions

    context.root = TreeNode(id=str(uuid.uuid4()), childrenIds=[])

    for n in roots:
        if n.childrenIds is not None and len(n.childrenIds) > 0:
            context.root.childrenIds.append(n.childrenIds[0])
    return context
Beispiel #2
0
def profilingContext(roots):
    context = ProfilingContext()
    context.nodes = nodes
    context.methods = methods.values()
    context.classes = classes.values()
    context.exceptions = exceptions

    context.root = TreeNode(id=str(uuid.uuid4()), childrenIds=[])

    for n in roots:
        if n.childrenIds is not None and len(n.childrenIds) > 0:
            context.root.childrenIds.append(n.childrenIds[0])
    return context