detkit.Profile.set#
- Profile.set()#
Sets or resets the start point of profiling.
Examples
>>> from detkit import Profile, memdet, human_readable_time >>> import numpy >>> # Create a random matrix >>> A = numpy.random.randn(10000, 10000) >>> # Initialize profile >>> prof = Profile() >>> # Set the starting point of memory inquiry >>> prof.set() >>> # Perform a memory-intensive operation >>> ld = memdet(A) >>> # Inquiry wall time >>> print(human_readable_time(prof.wall_time())) 5.0 sc