forked from OSchip/llvm-project
[clangd] Fix name hiding in TestTracer and disable racy test for now
This commit is contained in:
parent
e64f99c51a
commit
6c24b59ca1
|
@ -149,15 +149,6 @@ TEST_F(LSPTest, DiagnosticsHeaderSaved) {
|
|||
llvm::ValueIs(testing::ElementsAre(
|
||||
DiagMessage("Use of undeclared identifier 'changed'"))));
|
||||
}
|
||||
|
||||
TEST_F(LSPTest, RecordsLatencies) {
|
||||
trace::TestTracer Tracer;
|
||||
auto &Client = start();
|
||||
llvm::StringLiteral MethodName = "method_name";
|
||||
EXPECT_THAT(Tracer.takeMetric("lsp_latency", MethodName), testing::SizeIs(0));
|
||||
llvm::consumeError(Client.call(MethodName, {}).take().takeError());
|
||||
EXPECT_THAT(Tracer.takeMetric("lsp_latency", MethodName), testing::SizeIs(1));
|
||||
}
|
||||
} // namespace
|
||||
} // namespace clangd
|
||||
} // namespace clang
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace trace {
|
|||
/// A RAII Tracer that can be used by tests.
|
||||
class TestTracer : public EventTracer {
|
||||
public:
|
||||
TestTracer() : Session(*this) {}
|
||||
TestTracer() : S(*this) {}
|
||||
/// Stores all the measurements to be returned with take later on.
|
||||
void record(const Metric &Metric, double Value,
|
||||
llvm::StringRef Label) override;
|
||||
|
@ -40,7 +40,7 @@ private:
|
|||
std::mutex Mu;
|
||||
/// Measurements recorded per metric per label.
|
||||
llvm::StringMap<llvm::StringMap<std::vector<double>>> Measurements;
|
||||
Session Session;
|
||||
Session S;
|
||||
};
|
||||
|
||||
} // namespace trace
|
||||
|
|
Loading…
Reference in New Issue