Skip to content

Allow to show the full-path of the functions #78

@portikCoder

Description

@portikCoder

Lots of cases are, when simple module names are not enough to be able to differentiate them.
A simple switch and if does the trick, as you already have this here: https://github.com/jrfonseca/gprof2dot/blob/master/gprof2dot.py#L2729 (at least in case of cProfile)
The only change would be that the module would not have been extracted, so the filename goes straight forward.
For eg.:

2698     def get_function_name(self, key):
2699         filename, line, name = key
new           if self._display_full_path:
new             return "%s:%d:%s" % (filename, line, name)
2700         module = os.path.splitext(filename)[0]
2701         module = os.path.basename(module)
2702         return "%s:%d:%s" % (module, line, name)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions