mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
fc07c3b6e6
Summary: Add a fetch context interface to ObjectStore that allows tracing cache hits, backing store fetches, and fetch durations in the context of a diff or checkout operation. Reviewed By: simpkins Differential Revision: D19135625 fbshipit-source-id: d0d8f134b1c89f7ba4971a404a46a69a1704ba5c
25 lines
546 B
C++
25 lines
546 B
C++
/*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This software may be used and distributed according to the terms of the
|
|
* GNU General Public License version 2.
|
|
*/
|
|
|
|
#include "eden/fs/store/IObjectStore.h"
|
|
|
|
namespace {
|
|
using namespace facebook::eden;
|
|
class NullObjectFetchContext : public ObjectFetchContext {};
|
|
} // namespace
|
|
|
|
namespace facebook {
|
|
namespace eden {
|
|
|
|
ObjectFetchContext& ObjectFetchContext::getNullContext() {
|
|
static auto* p = new NullObjectFetchContext;
|
|
return *p;
|
|
}
|
|
|
|
} // namespace eden
|
|
} // namespace facebook
|