the very slight speedup in config setting access is not worth the maintenance overhead of conflating concers like this. the virtual inheritance scheme used for configs requires too much duplication of base class constructor arguments to be worth doing. perhaps we should get rid of all virtual inheritance of data-membered bases? Change-Id: I4acf5ceaedb4ed7476efe1114c2e065ec72d2c6d
35 lines
641 B
C++
35 lines
641 B
C++
#pragma once
|
|
///@file
|
|
|
|
#include "lix/libstore/binary-cache-store.hh"
|
|
|
|
#include <atomic>
|
|
|
|
namespace nix {
|
|
|
|
class S3BinaryCacheStore : public virtual BinaryCacheStore
|
|
{
|
|
protected:
|
|
|
|
using BinaryCacheStore::BinaryCacheStore;
|
|
|
|
public:
|
|
|
|
struct Stats
|
|
{
|
|
std::atomic<uint64_t> put{0};
|
|
std::atomic<uint64_t> putBytes{0};
|
|
std::atomic<uint64_t> putTimeMs{0};
|
|
std::atomic<uint64_t> get{0};
|
|
std::atomic<uint64_t> getBytes{0};
|
|
std::atomic<uint64_t> getTimeMs{0};
|
|
std::atomic<uint64_t> head{0};
|
|
};
|
|
|
|
virtual const Stats & getS3Stats() = 0;
|
|
};
|
|
|
|
void registerS3BinaryCacheStore();
|
|
|
|
}
|