class_docstr: Context-manager profile API.
  
  Profiling will start when entering the scope, and stop and save the results to
  the logdir when exits the scope. Open TensorBoard profile tab to view results.
  
  Example usage:
  ```python
  with tf.profiler.experimental.Profile("/path/to/logdir"):
    # do some work
  ```
class_docstr_tok: ["Context-manager","profile","API",".","Profiling","will","start","when","entering","the","scope",",","and","stop","and","save","the","results","to","the","logdir","when","exits","the","scope",".","Open","TensorBoard","profile","tab","to","view","results",".","Example","usage",":","``","`","python","with","tf.profiler.experimental.Profile","(","``","\/path\/to\/logdir","''",")",":","#","do","some","work","``","`"]
code: def __exit__(self, typ, value, tb):
      stop()
  
file_path: tensorflow-upstream/tensorflow/python/profiler/profiler_v2.py
imports: import collections
  import threading
  from tensorflow.python.framework import errors
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.profiler.internal import _pywrap_profiler
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 3 for calling the Profile obj's underlying member method code with example usage: obj.__exit__(typ, value, tb) without return types