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

Add segment merge time as a metric #1770

Merged
merged 1 commit into from
Oct 23, 2015
Merged

Add segment merge time as a metric #1770

merged 1 commit into from
Oct 23, 2015

Conversation

nishantmonu51
Copy link
Member

Adds these metrics -

  1. Segment merge time
  2. thread cpu times for segment merge and persist

@@ -538,6 +538,9 @@ public void doRun()
cleanShutdown = false;
abandonSegment(truncatedTime, sink);
}
} finally {
metrics.incrementPersistTimeMillis(mergeStopwatch.elapsed(TimeUnit.MILLISECONDS));
Copy link
Member

Choose a reason for hiding this comment

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

this also includes segment publish time, it might be worthwhile to only count actual merge time if handoff can take a while?

Copy link
Member Author

Choose a reason for hiding this comment

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

moved it to exclude segment publish time.

@drcrallen
Copy link
Contributor

How viable is it to add CPU time in addition to wall-time?

@nishantmonu51
Copy link
Member Author

@drcrallen added cpuTime for both persist and merge operations. please have a look again.

emitter.emit(builder.build("ingest/merge/time", metrics.mergeTimeMillis() - previous.mergeTimeMillis()));
emitter.emit(builder.build("ingest/merge/cpu", metrics.mergeCpuTime() - previous.mergeCpuTime()));
emitter.emit(builder.build("ingest/persist/cpu", metrics.persistCpuTime() - previous.persistCpuTime()));

Copy link
Member

Choose a reason for hiding this comment

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

minor nit, unnecessary empty lines

Copy link
Member Author

Choose a reason for hiding this comment

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

removed empty lines.

@nishantmonu51 nishantmonu51 force-pushed the merge-time branch 2 times, most recently from e2f8717 to 795d09f Compare September 28, 2015 18:18

emitter.emit(builder.build("ingest/merge/time", metrics.mergeTimeMillis() - previous.mergeTimeMillis()));
emitter.emit(builder.build("ingest/merge/cpu", metrics.mergeCpuTime() - previous.mergeCpuTime()));
emitter.emit(builder.build("ingest/persist/cpu", metrics.persistCpuTime() - previous.persistCpuTime()));
Copy link
Contributor

Choose a reason for hiding this comment

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

this needs documentation update.

Copy link
Contributor

Choose a reason for hiding this comment

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

also, it appears we will be publishing these metrics whether or not cpu time is supported , so should document that if user sees a value of 0 then that means its just not supported on the jvm

Copy link
Member Author

Choose a reason for hiding this comment

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

done. added docs.

Add merge and persist cpu time

Fix typo

review comment

move cpu time measuring to VMUtils

review comments.
@himanshug
Copy link
Contributor

LGTM

@drcrallen
Copy link
Contributor

👍 @xvrl are your comments addressed?

xvrl added a commit that referenced this pull request Oct 23, 2015
Add segment merge time as a metric
@xvrl xvrl merged commit 72c408c into apache:master Oct 23, 2015
@xvrl xvrl deleted the merge-time branch October 23, 2015 05:03
@gianm gianm added this to the 0.9.0 milestone Nov 7, 2015
nishantmonu51 added a commit that referenced this pull request Dec 17, 2015
Backport #1770 - Add segment merge time as a metric
@gianm gianm mentioned this pull request Jan 8, 2016
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.

None yet

5 participants