127 questions for “Profiling”

Found in 1 field. Select a question to see its full answer.

Information Technology

127 questions in 6 technologies

#QuestionTechnologyTopicLevel
1How would you use jstat to monitor GC activity and heap generation sizes for a running JVM process in real time, without needing a full profiling tool? Java › Garbage CollectionJavaGarbage CollectionIntermediate
2How do you use the timeit module to accurately measure a small code snippet's execution time? Python › Debugging & ProfilingPythonDebugging & ProfilingIntermediate
3How do you use cProfile to identify which functions are consuming the most time in a larger program? Python › Debugging & ProfilingPythonDebugging & ProfilingIntermediate
4How would you use the 'faulthandler' module to diagnose a program that crashes with a segmentation fault, typically from a C extension? Python › Debugging & ProfilingPythonDebugging & ProfilingAdvanced
5How would you use line_profiler (a third-party tool) to get LINE-BY-LINE timing information within a specific function, more granular than cProfile's function-level data? Python › Debugging & ProfilingPythonDebugging & ProfilingAdvanced
6How would you use py-spy (a sampling profiler) to profile a running Python process in PRODUCTION without restarting it or adding any code changes? Python › Debugging & ProfilingPythonDebugging & ProfilingAdvanced
7How do you use the built-in pdb debugger to pause execution at a specific line? Python › Debugging & ProfilingPythonDebugging & ProfilingBeginner
8How do you use print statements effectively for debugging, including showing variable names alongside values? Python › Debugging & ProfilingPythonDebugging & ProfilingBeginner
9How do you use the traceback module to capture and format a full exception traceback as a string, useful for logging? Python › Debugging & ProfilingPythonDebugging & ProfilingIntermediate
10How do assert statements work for debugging, and why should they NOT be relied upon for production input validation? Python › Debugging & ProfilingPythonDebugging & ProfilingIntermediate