clang-tools
11.0.0
|
Classes | |
class | EventTracer |
A consumer of trace events and measurements. More... | |
struct | Metric |
Represents measurements of clangd events, e.g. More... | |
class | Session |
Sets up a global EventTracer that consumes events produced by Span and trace::log. More... | |
class | Span |
Records an event whose duration is the lifetime of the Span object. More... | |
class | TestTracer |
A RAII Tracer that can be used by tests. More... | |
Functions | |
std::unique_ptr< EventTracer > | createJSONTracer (llvm::raw_ostream &OS, bool Pretty=false) |
Create an instance of EventTracer that produces an output in the Trace Event format supported by Chrome's trace viewer (chrome://tracing). More... | |
std::unique_ptr< EventTracer > | createCSVMetricTracer (llvm::raw_ostream &OS) |
Create an instance of EventTracer that outputs metric measurements as CSV. More... | |
void | log (const llvm::Twine &Name) |
Records a single instant event, associated with the current thread. More... | |
static Context | makeSpanContext (llvm::Twine Name, llvm::json::Object *Args, const Metric &LatencyMetric) |
constexpr Metric | SpanLatency ("span_latency", Metric::Distribution, "span_name") |
std::unique_ptr< EventTracer > clang::clangd::trace::createCSVMetricTracer | ( | llvm::raw_ostream & | OS | ) |
Create an instance of EventTracer that outputs metric measurements as CSV.
Trace spans and instant events are ignored.
Definition at line 270 of file Trace.cpp.
References OS.
Referenced by main().
std::unique_ptr< EventTracer > clang::clangd::trace::createJSONTracer | ( | llvm::raw_ostream & | OS, |
bool | Pretty = false |
||
) |
Create an instance of EventTracer that produces an output in the Trace Event format supported by Chrome's trace viewer (chrome://tracing).
FIXME: Metrics are not recorded, some could become counter events.
The format is documented here: https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview
Definition at line 265 of file Trace.cpp.
Referenced by main().
void clang::clangd::trace::log | ( | const llvm::Twine & | Message | ) |
Records a single instant event, associated with the current thread.
Definition at line 274 of file Trace.cpp.
References clang::tidy::bugprone::Message.
Referenced by clang::clangd::StreamLogger::log().
|
constexpr |