#include <LoadSample.h>
Public Member Functions | |
LoadSample (void) | |
Create empty sample. | |
LoadSample (unsigned long long time, unsigned long long counter) | |
Create empty sample with timestamps. | |
LoadSample (size_t processors, size_t networks, size_t drives) | |
Create pre-allocated sample. | |
void | ReallocProcessorData (size_t processors) |
Reallocate storage for processor data. | |
void | ReallocNetworkData (size_t networks) |
Reallocate storage for network data. | |
void | ReallocateDriveData (size_t drives) |
Reallocate drive data. | |
Data Fields | |
std::vector< jshort > | processor_usage |
CPU usage in percent. | |
std::vector< jint > | network_bytes_in |
Bytes received per sec. for each network adapter. | |
std::vector< jint > | network_bytes_out |
Bytes sent per sec. for each network adapter. | |
std::vector< jlong > | disk_write_bytes |
Write speed for each drive. | |
std::vector< jlong > | disk_read_bytes |
Read speed for each drive. | |
unsigned long long | memory_free |
Free RAM in bytes. | |
unsigned long long | sample_time |
Timestamp, 100 ns intervals since Windows epoch. | |
unsigned long long | tsc |
Timestamp counter of the CPU current thread is running on. | |
unsigned int | processor_queue |
Number of processes in thread queue. | |
unsigned int | process_count |
Total number of running processes. |
lm::LoadSample::LoadSample | ( | void | ) |
Create empty sample.
Creates sample with no data.
lm::LoadSample::LoadSample | ( | unsigned long long | time, | |
unsigned long long | counter | |||
) |
Create empty sample with timestamps.
Create sample with no data but given timestamps.
time | Sample time, 100 ns intervals since Windows epoch. | |
counter | Timestamp counter of the CPU. |
lm::LoadSample::LoadSample | ( | size_t | processors, | |
size_t | networks, | |||
size_t | drives | |||
) |
Create pre-allocated sample.
Creates sample with pre-allocated arrays for processor usage, network traffic and drive usage.
processors | Number of processors. | |
networks | Number of network adapters. | |
drives | Number of disk drives. |
void lm::LoadSample::ReallocateDriveData | ( | size_t | drives | ) |
Reallocate drive data.
drives | New number of disk drives. |
void lm::LoadSample::ReallocNetworkData | ( | size_t | networks | ) |
Reallocate storage for network data.
networks | New number of network adapters/interfaces. |
void lm::LoadSample::ReallocProcessorData | ( | size_t | processors | ) |
Reallocate storage for processor data.
processors | New number of processors. |
std::vector< jlong > lm::LoadSample::disk_read_bytes |
Read speed for each drive.
std::vector< jlong > lm::LoadSample::disk_write_bytes |
Write speed for each drive.
unsigned long long lm::LoadSample::memory_free |
Free RAM in bytes.
std::vector< jint > lm::LoadSample::network_bytes_in |
Bytes received per sec. for each network adapter.
std::vector< jint > lm::LoadSample::network_bytes_out |
Bytes sent per sec. for each network adapter.
unsigned int lm::LoadSample::process_count |
Total number of running processes.
unsigned int lm::LoadSample::processor_queue |
Number of processes in thread queue.
std::vector< jshort > lm::LoadSample::processor_usage |
CPU usage in percent.
unsigned long long lm::LoadSample::sample_time |
Timestamp, 100 ns intervals since Windows epoch.
unsigned long long lm::LoadSample::tsc |
Timestamp counter of the CPU current thread is running on.