Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/gridedit 589 query sys mem bench #196

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

ahmad-el-sayed
Copy link
Contributor

No description provided.

lucacarniato and others added 21 commits June 13, 2023 15:22
MemoryMonitor() = default;
virtual ~MemoryMonitor() = default;
// non-copyable
MemoryMonitor(const MemoryMonitor& other) = delete;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you might move all deleted constructors and operators to private

// PROCESS_MEMORY_COUNTERS_EX pmc;
PROCESS_MEMORY_COUNTERS pmc;
if (GetProcessMemoryInfo(m_current_process,
reinterpret_cast<PPROCESS_MEMORY_COUNTERS>(&pmc),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reinterpret_cast<PPROCESS_MEMORY_COUNTERS> might not be needed

switch (memory_type)
{
case MemoryType::Physical:
return static_cast<uint64_t>(pmc.WorkingSetSize);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also all these static casts

void Start() override;

/// @brief Stop recording and fills out the given Result structure
/// @param[result] Structure
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

param[out] result?

~WindowsMemoryMonitor() = default;

// non-copyable
WindowsMemoryMonitor(const WindowsMemoryMonitor&) = delete;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To private

std::string Statistics(std::string const& caller = std::string()) const;

/// @brief Overlaod of oepartor << for printing the statistics of the class MemorySystemQuery
/// @param[ostream] Output stream
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

int64_t m_max_bytes_used = TombstoneValue; ///< The peak memory use in bytes between Start and Stop

MemorySystemQuery() = default;
~MemorySystemQuery() = default;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

~MemorySystemQuery() override = default;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants