MCPcopy Create free account
hub / github.com/AutonomousVehicleLaboratory/SemVecNet / inner

Function inner

semantic_mapping/src/utils/utils.py:19–29  ·  view source on GitHub ↗
(*args, **argv)

Source from the content-addressed store, hash-verified

17 """ A decorator that uses cProfile to profile a function """
18
19 def inner(*args, **argv):
20 pr = cProfile.Profile()
21 pr.enable()
22 retval = function(*args, **argv)
23 pr.disable()
24 s = io.StringIO()
25 sortby = 'cumulative'
26 ps = pstats.Stats(pr).sort_stats(sortby)
27 ps.print_stats(0.1)
28 print(s.getvalue())
29 return retval
30
31 return inner
32

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected