class_docstr: This profiler simply records the duration of actions (in seconds) and reports the mean duration of each action
  and the total time spent over the entire training run.
class_docstr_tok: ["This","profiler","simply","records","the","duration","of","actions","(","in","seconds",")","and","reports","the","mean","duration","of","each","action","and","the","total","time","spent","over","the","entire","training","run","."]
code: def stop(self, action_name: str) -> None:
      end_time = time.monotonic()
      if action_name not in self.current_actions:
          raise ValueError(
              f"Attempting to stop recording an action ({action_name}) which was never started."
          )
      start_time = self.current_actions.pop(action_name)
      duration = end_time - start_time
      self.recorded_durations[action_name].append(duration)
  
file_path: pytorch-lightning/src/lightning/pytorch/profilers/simple.py
imports: import logging
  import os
  import time
  from collections import defaultdict
  from pathlib import Path
  from typing import Dict, List, Optional, Tuple, Union
  import torch
  from typing_extensions import override
  from lightning.pytorch.profilers.profiler import Profiler
label_desc: Use image node_id 3 for calling the SimpleProfiler obj's underlying member method code with example usage: obj.stop(action_name) without return types