blob: 6c8f670331a2519d662221f45260ca6a970a933b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include "address_space_usage_stats.h"
#include <vespa/searchlib/attribute/address_space_usage.h>
namespace proton {
/**
* Class representing aggregated max address space usage
* among components in attributes vectors in all sub databases.
*/
class AttributeUsageStats
{
AddressSpaceUsageStats _max_usage;
public:
AttributeUsageStats();
~AttributeUsageStats();
void merge(const search::AddressSpaceUsage &usage,
const vespalib::string &attributeName,
const vespalib::string &subDbName);
const AddressSpaceUsageStats& max_address_space_usage() const { return _max_usage; }
bool operator==(const AttributeUsageStats& rhs) const {
return (_max_usage == rhs._max_usage);
}
};
std::ostream& operator<<(std::ostream& out, const AttributeUsageStats& rhs);
} // namespace proton
|