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

[ML] Format memory instrumentation output #1022

Merged
merged 12 commits into from
Mar 5, 2020

Conversation

valeriy42
Copy link
Contributor

This PR activates memory instrumentation and formats it according to the specified JSON format.

Copy link
Contributor

@tveasey tveasey left a comment

Choose a reason for hiding this comment

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

This basically LGTM. My one notable comment is I think we could make the test slightly more robust with a small change.

this->writeMemory(step);
// this->writeProgress(step);
int64_t timestamp = core::CTimeUtils::toEpochMs(core::CTimeUtils::now());
this->writeMemory(timestamp);
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: use std::int64_t, or how about just this->writeMemory(core::CTimeUtils::toEpochMs(core::CTimeUtils::now());

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will have to write the time stamp into analysis object as well. Thus, I prefer to keep it as a variable.

lib/api/unittest/CDataFrameAnalysisInstrumentationTest.cc Outdated Show resolved Hide resolved
lib/api/unittest/CDataFrameAnalysisInstrumentationTest.cc Outdated Show resolved Hide resolved
}

void CDataFrameAnalysisInstrumentation::writeState(std::uint32_t step) {
this->writeProgress(step);
this->writeMemory(step);
// this->writeProgress(step);
Copy link
Contributor

Choose a reason for hiding this comment

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

I am a bit confused with this commented out line. Will progress be written out from here instead of CDataFrameAnalyzer?

lib/api/CDataFrameAnalysisInstrumentation.cc Outdated Show resolved Hide resolved
Copy link
Contributor

@dimitris-athanasiou dimitris-athanasiou left a comment

Choose a reason for hiding this comment

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

LGTM2 I opened elastic/elasticsearch#52778 which is a prerequisite for this PR to be merged

@dimitris-athanasiou
Copy link
Contributor

This is ready to be merged now from the java side.

@dimitris-athanasiou
Copy link
Contributor

run tests

@dimitris-athanasiou
Copy link
Contributor

run elasticsearch-ci

@dimitris-athanasiou
Copy link
Contributor

retest

@tveasey tveasey merged commit 0108a6e into elastic:master Mar 5, 2020
tveasey added a commit to tveasey/ml-cpp-1 that referenced this pull request Mar 5, 2020
tveasey added a commit that referenced this pull request Mar 6, 2020
@valeriy42 valeriy42 deleted the memory-foramt branch May 6, 2020 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants