4#ifndef _Stroika_Framework_SystemPerformance_Support_WMICollector_h_
5#define _Stroika_Framework_SystemPerformance_Support_WMICollector_h_ 1
7#include "Stroika/Frameworks/StroikaPreComp.h"
12#if qStroika_Foundation_Common_Platform_Windows
15#error "WINDOWS REQUIRED FOR THIS MODULE"
18#include "Stroika/Foundation/Containers/Mapping.h"
19#include "Stroika/Foundation/Containers/Set.h"
53namespace Stroika::Frameworks::SystemPerformance::Support {
55 using Foundation::Characters::String;
56 using Foundation::Containers::Mapping;
57 using Foundation::Containers::Set;
58 using Foundation::Time::TimePointSeconds;
59 using Foundation::Traversal::Iterable;
85 static String kWildcardInstance;
104 nonvirtual
void Collect ();
107 nonvirtual optional<TimePointSeconds> GetTimeOfLastCollection ()
const;
172 optional<TimePointSeconds> fTimeOfLastCollection_{};
177 struct PerInstanceData_ {
180 PDH_HQUERY fQuery_{};
184 PerInstanceData_ () =
delete;
185 ~PerInstanceData_ ();
187 void AddCounter (
const String& counterName);
188 double GetCurrentValue (
const String& counterName);
189 optional<double> PeekCurrentValue (
const String& counterName);
199 nonvirtual
void AddCounter_ (
const String& counterName);
202 nonvirtual
void AddInstance_ (
const String& instance);
212#include "WMICollector.inl"
String is like std::u32string, except it is much easier to use, often much more space efficient,...
Set<T> is a container of T, where once an item is added, additionally adds () do nothing.
NOT a real mutex - just a debugging infrastructure support tool so in debug builds can be assured thr...
Iterable<T> is a base class for containers which easily produce an Iterator<T> to traverse them.