-
Notifications
You must be signed in to change notification settings - Fork 395
Open
Labels
Description
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)