MCPcopy Create free account
hub / github.com/ceph/ceph / get_precision

Method get_precision

src/mon/ConfigMap.cc:44–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42using ceph::timespan_str;
43
44int MaskedOption::get_precision(const CrushWrapper *crush)
45{
46 // 0 = most precise
47 if (mask.location_type.size()) {
48 int r = crush->get_type_id(mask.location_type);
49 if (r >= 0) {
50 return r;
51 }
52 // bad type name, ignore it
53 }
54 int num_types = crush->get_num_type_names();
55 if (mask.device_class.size()) {
56 return num_types;
57 }
58 return num_types + 1;
59}
60
61void OptionMask::dump(Formatter *f) const
62{

Callers 1

generate_entity_mapMethod · 0.80

Calls 3

get_type_idMethod · 0.80
get_num_type_namesMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected