clang-tools  8.0.0
Public Member Functions | List of all members
clang::clangd::trace::EventTracer Class Referenceabstract

A consumer of trace events. More...

#include <Trace.h>

Public Member Functions

virtual ~EventTracer ()=default
 
virtual Context beginSpan (llvm::StringRef Name, llvm::json::Object *Args)=0
 Called when event that has a duration starts. More...
 
virtual void endSpan ()
 
virtual void instant (llvm::StringRef Name, llvm::json::Object &&Args)=0
 Called for instant events. More...
 

Detailed Description

A consumer of trace events.

The events are produced by Spans and trace::log. Implmentations of this interface must be thread-safe.

Definition at line 33 of file Trace.h.

Constructor & Destructor Documentation

◆ ~EventTracer()

virtual clang::clangd::trace::EventTracer::~EventTracer ( )
virtualdefault

Member Function Documentation

◆ beginSpan()

virtual Context clang::clangd::trace::EventTracer::beginSpan ( llvm::StringRef  Name,
llvm::json::Object *  Args 
)
pure virtual

Called when event that has a duration starts.

Name describes the event. Returns a derived context that will be destroyed when the event ends. Usually implementations will store an object in the returned context whose destructor records the end of the event. The args are *Args, only complete when the event ends.

◆ endSpan()

virtual void clang::clangd::trace::EventTracer::endSpan ( )
inlinevirtual

Definition at line 48 of file Trace.h.

References instant().

◆ instant()

virtual void clang::clangd::trace::EventTracer::instant ( llvm::StringRef  Name,
llvm::json::Object &&  Args 
)
pure virtual

Called for instant events.

Referenced by endSpan().


The documentation for this class was generated from the following file: