chromium/base/metrics/sample_map.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/metrics/sample_map.h"

#include <type_traits>

#include "base/check.h"
#include "base/numerics/safe_conversions.h"

namespace base {

Count;
Sample;

namespace {

// An iterator for going through a SampleMap. The logic here is identical
// to that of the iterator for PersistentSampleMap but with different data
// structures. Changes here likely need to be duplicated there.
template <typename T, typename I>
class IteratorTemplate : public SampleCountIterator {};

SampleToCountMap;
SampleMapIterator;

template <>
SampleMapIterator::~IteratorTemplate() = default;

// Get() for an iterator of a SampleMap.
template <>
void SampleMapIterator::Get(Sample* min, int64_t* max, Count* count) {}

ExtractingSampleMapIterator;

template <>
ExtractingSampleMapIterator::~IteratorTemplate() {}

// Get() for an extracting iterator of a SampleMap.
template <>
void ExtractingSampleMapIterator::Get(Sample* min, int64_t* max, Count* count) {}

}  // namespace

SampleMap::SampleMap() :{}

SampleMap::SampleMap(uint64_t id)
    :{}

SampleMap::~SampleMap() = default;

void SampleMap::Accumulate(Sample value, Count count) {}

Count SampleMap::GetCount(Sample value) const {}

Count SampleMap::TotalCount() const {}

std::unique_ptr<SampleCountIterator> SampleMap::Iterator() const {}

std::unique_ptr<SampleCountIterator> SampleMap::ExtractingIterator() {}

bool SampleMap::IsDefinitelyEmpty() const {}

bool SampleMap::AddSubtractImpl(SampleCountIterator* iter, Operator op) {}

}  // namespace base