diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-08-18 03:02:49 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-08-18 03:02:49 +0200 |
commit | 7a4461355f7ee8e5ec71888516cbfd640dd7e110 (patch) | |
tree | 5f800152d48de71247177c4fca93fff24dc993ac /storageframework | |
parent | 15e7bcd9e902407fbe14cf830968f06c9fb5fb89 (diff) |
Include only what you need.
Diffstat (limited to 'storageframework')
5 files changed, 24 insertions, 31 deletions
diff --git a/storageframework/src/vespa/storageframework/defaultimplementation/component/componentregisterimpl.h b/storageframework/src/vespa/storageframework/defaultimplementation/component/componentregisterimpl.h index 87659b55250..7319a1e7d57 100644 --- a/storageframework/src/vespa/storageframework/defaultimplementation/component/componentregisterimpl.h +++ b/storageframework/src/vespa/storageframework/defaultimplementation/component/componentregisterimpl.h @@ -31,9 +31,8 @@ namespace metrics { } -namespace storage { -namespace framework { -namespace defaultimplementation { + +namespace storage::framework::defaultimplementation { struct ShutdownListener { virtual ~ShutdownListener() {} @@ -89,8 +88,4 @@ public: }; -} // defaultimplementation -} // framework -} // storage - - +} diff --git a/storageframework/src/vespa/storageframework/defaultimplementation/memory/memorystate.cpp b/storageframework/src/vespa/storageframework/defaultimplementation/memory/memorystate.cpp index 54da9be7e31..2351edd267c 100644 --- a/storageframework/src/vespa/storageframework/defaultimplementation/memory/memorystate.cpp +++ b/storageframework/src/vespa/storageframework/defaultimplementation/memory/memorystate.cpp @@ -84,8 +84,8 @@ MemoryState::addToEntry(const MemoryAllocationType& type, uint64_t memory, AllocationResult result, bool forcedAllocation, uint64_t allocationCounts) { - LOG(spam, "Allocating memory %s - %" PRIu64 " bytes at priority %u. " - "Count %" PRIu64 ".", + LOG(spam, "Allocating memory %s - %lu bytes at priority %u. " + "Count %lu.", type.getName().c_str(), memory, priority, allocationCounts); PriorityMap& map(_current._allocations[&type]); Entry& e(map[priority]); @@ -110,7 +110,7 @@ MemoryState::addToEntry(const MemoryAllocationType& type, uint64_t memory, if (_current._usedWithoutCache > _max._usedWithoutCache + _minJumpToUpdateMax) { - LOG(spam, "Updating max to current %" PRIu64 " bytes of memory used", + LOG(spam, "Updating max to current %lu bytes of memory used", _current._usedWithoutCache); _max = _current; _max._timeTaken = _clock->getTimeInSeconds(); @@ -122,8 +122,8 @@ MemoryState::removeFromEntry(const MemoryAllocationType& type, uint64_t memory, uint8_t priority, uint64_t allocationCounts) { - LOG(spam, "Freeing memory %s - %" PRIu64 " bytes at priority %u. " - "Count %" PRIu64 ".", + LOG(spam, "Freeing memory %s - %lu bytes at priority %u. " + "Count %lu.", type.getName().c_str(), memory, priority, allocationCounts); PriorityMap& map(_current._allocations[&type]); Entry& e(map[priority]); diff --git a/storageframework/src/vespa/storageframework/defaultimplementation/memory/prioritymemorylogic.cpp b/storageframework/src/vespa/storageframework/defaultimplementation/memory/prioritymemorylogic.cpp index 681ee10df0f..51bb7ba5019 100644 --- a/storageframework/src/vespa/storageframework/defaultimplementation/memory/prioritymemorylogic.cpp +++ b/storageframework/src/vespa/storageframework/defaultimplementation/memory/prioritymemorylogic.cpp @@ -5,14 +5,12 @@ #include <vespa/log/log.h> LOG_SETUP(".memory.logic.priority"); -namespace storage { -namespace framework { -namespace defaultimplementation { +namespace storage::framework::defaultimplementation { PriorityMemoryLogic::PriorityMemoryLogic(Clock& c, uint64_t maxMem) : SimpleMemoryLogic(c, maxMem) { - LOG(debug, "Setup priority memory logic with max memory of %" PRIu64 " bytes", maxMem); + LOG(debug, "Setup priority memory logic with max memory of %lu bytes", maxMem); } float @@ -29,6 +27,4 @@ PriorityMemoryLogic::print(std::ostream& out, bool verbose, SimpleMemoryLogic::print(out, verbose, indent); } -} // defaultimplementation -} // framework -} // storage +} diff --git a/storageframework/src/vespa/storageframework/defaultimplementation/thread/threadimpl.cpp b/storageframework/src/vespa/storageframework/defaultimplementation/thread/threadimpl.cpp index 1fb4adc6618..b9ccb2d4d9f 100644 --- a/storageframework/src/vespa/storageframework/defaultimplementation/thread/threadimpl.cpp +++ b/storageframework/src/vespa/storageframework/defaultimplementation/thread/threadimpl.cpp @@ -82,9 +82,9 @@ ThreadImpl::registerTick(CycleType cycleType, MilliSecTime time) if (data._lastTickMs == 0) { return; } if (previousTickMs > nowMs) { - LOGBP(warning, "Thread is registering tick at time %" PRIu64 ", but " - "last time it registered a tick, the time was %" - PRIu64 ". Assuming clock has been adjusted backwards", + LOGBP(warning, "Thread is registering tick at time %lu, but " + "last time it registered a tick, the time was %lu" + ". Assuming clock has been adjusted backwards", nowMs, previousTickMs); return; } diff --git a/storageframework/src/vespa/storageframework/generic/metric/metricregistrator.h b/storageframework/src/vespa/storageframework/generic/metric/metricregistrator.h index 7d0ae594e5f..7b05bbe8040 100644 --- a/storageframework/src/vespa/storageframework/generic/metric/metricregistrator.h +++ b/storageframework/src/vespa/storageframework/generic/metric/metricregistrator.h @@ -10,22 +10,24 @@ */ #pragma once -#include <vespa/vespalib/stllike/string.h> +#include <vespa/storageframework/generic/clock/time.h> #include <vespa/vespalib/util/sync.h> -namespace storage { -namespace framework { +namespace metrics { + class Metric; +} + +namespace storage::framework { + +class MetricUpdateHook; struct MetricRegistrator { virtual ~MetricRegistrator() {} virtual void registerMetric(metrics::Metric&) = 0; - virtual void registerUpdateHook(vespalib::stringref name, - MetricUpdateHook& hook, - SecondTime period) = 0; + virtual void registerUpdateHook(vespalib::stringref name, MetricUpdateHook& hook, SecondTime period) = 0; virtual vespalib::MonitorGuard getMetricManagerLock() = 0; }; -} // framework -} // storage +} |