Anthropic

Verified interview challenge

Profiler trace bug hunt

Find the bugs in a profiler that identifies which function consumed the most execution time.

Unlock with Full Access

The challenge

A function processes start and end events from a single thread and calculates time spent inside each function. Inspect how it handles nested calls, recursion and incomplete or invalid traces. Explain the faults and how you would correct them without rewriting the implementation.

What you'll practise

  • Nested execution

    Reason about time spent in a function and in the calls it makes.

  • Trace validation

    Check that event sequences follow the required call structure.

  • Boundary cases

    Follow the behaviour when calls repeat or remain open.

Your code-review workspacePreview
Profiler implementationCode included in the full challenge
Your diagnosis

Explain the timing and trace-validation faults.

The code, instructions and feedback are included with Full Access.