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

[pulsar-perf] Write histogram files for consume command #12569

Merged
merged 3 commits into from
Nov 5, 2021

Conversation

mfleming
Copy link
Contributor

@mfleming mfleming commented Nov 1, 2021

Motivation

The consume command for pulsar-perf doesn't generate histogram file (.hgrm files) like its counterpart produce which makes it more difficult to automate collection of consumer performance results and basically necessitates sending metrics to prometheus, etc.

Modifications

Write the contents of the histogram to a .hgrm file like the produce command.

Verifying this change

  • Make sure that the change passes the CI checks.
  • This change is a trivial rework / code cleanup without any test coverage.

Does this pull request potentially affect one of the following parts:

No

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): (yes / no)
  • The public API: (yes / no)
  • The schema: (yes / no / don't know)
  • The default values of configurations: (yes / no)
  • The wire protocol: (yes / no)
  • The rest endpoints: (yes / no)
  • The admin cli options: (yes / no)
  • Anything that affects deployment: (yes / no / don't know)

Documentation

Check the box below and label this PR (if you have committer privilege).

Need to update docs?

  • no-need-doc

The change brings behaviour inline with the produce command and I'm not sure additional docs are needed.

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Nov 1, 2021
@github-actions
Copy link

github-actions bot commented Nov 1, 2021

@mfleming:Thanks for providing doc info!

@@ -407,6 +410,16 @@ public static void main(String[] args) throws Exception {

Histogram reportHistogram = null;

String statsFileName = "perf-consumer-" + System.currentTimeMillis() + ".hgrm";
Copy link
Contributor

Choose a reason for hiding this comment

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

This should probably be turned off by default

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should it be disabled by default to maintain backwards compatible behaviour before this change? My intention was to make both produce and consume behave the same way and this functionality is default enabled for produce.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I think we should also disable for producer as most of the time people are not going to make use of the histograms.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

Thank you very much for your contribution.

I second @merlimat 's comments.
Please address those comments and we are good to ho as soon as CI passes

@@ -407,6 +410,16 @@ public static void main(String[] args) throws Exception {

Histogram reportHistogram = null;

String statsFileName = "perf-consumer-" + System.currentTimeMillis() + ".hgrm";
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree

Most users don't use the histogram files and instead opt for sending
metrics to prometheus, etc, so there's no need to have this enabled by
default.

Instead, add a new --histogram-file parameter to pulsar-perf
produce/consume which, when specified, dumps the contents of the
internal histogram to the given filename.

Previous behaviour can be achieved with the following options:

  $ pulsar-perf produce --histogram-file perf-producer-$(date +%s).hgrm
Copy link
Contributor

@merlimat merlimat left a comment

Choose a reason for hiding this comment

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

👍

@merlimat merlimat added area/cli type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages labels Nov 3, 2021
@merlimat merlimat added this to the 2.10.0 milestone Nov 3, 2021
@codelipenghui
Copy link
Contributor

@eolivelli Please help review the PR.

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

Lgtm

@eolivelli eolivelli merged commit 48de2e2 into apache:master Nov 5, 2021
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request Nov 5, 2021
* [pulsar-perf] Write histogram files for consume command

* [pulsar-perf] Disable writing to histogram files by default

Most users don't use the histogram files and instead opt for sending
metrics to prometheus, etc, so there's no need to have this enabled by
default.

Instead, add a new --histogram-file parameter to pulsar-perf
produce/consume which, when specified, dumps the contents of the
internal histogram to the given filename.

Previous behaviour can be achieved with the following options:

  $ pulsar-perf produce --histogram-file perf-producer-$(date +%s).hgrm

* [pulsar-perf] Update docs with --histogram-file param

(cherry picked from commit 48de2e2)
eolivelli pushed a commit that referenced this pull request Nov 9, 2021
* [pulsar-perf] Write histogram files for consume command

* [pulsar-perf] Disable writing to histogram files by default

Most users don't use the histogram files and instead opt for sending
metrics to prometheus, etc, so there's no need to have this enabled by
default.

Instead, add a new --histogram-file parameter to pulsar-perf
produce/consume which, when specified, dumps the contents of the
internal histogram to the given filename.

Previous behaviour can be achieved with the following options:

  $ pulsar-perf produce --histogram-file perf-producer-$(date +%s).hgrm

* [pulsar-perf] Update docs with --histogram-file param

(cherry picked from commit 48de2e2)
@eolivelli eolivelli modified the milestones: 2.10.0, 2.9.0 Nov 9, 2021
@mfleming mfleming deleted the pulsar-perf-hgrm branch November 10, 2021 14:26
@codelipenghui codelipenghui modified the milestones: 2.9.0, 2.10.0 Nov 26, 2021
eolivelli pushed a commit to eolivelli/pulsar that referenced this pull request Nov 29, 2021
* [pulsar-perf] Write histogram files for consume command

* [pulsar-perf] Disable writing to histogram files by default

Most users don't use the histogram files and instead opt for sending
metrics to prometheus, etc, so there's no need to have this enabled by
default.

Instead, add a new --histogram-file parameter to pulsar-perf
produce/consume which, when specified, dumps the contents of the
internal histogram to the given filename.

Previous behaviour can be achieved with the following options:

  $ pulsar-perf produce --histogram-file perf-producer-$(date +%s).hgrm

* [pulsar-perf] Update docs with --histogram-file param
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request Dec 3, 2021
* [pulsar-perf] Write histogram files for consume command

* [pulsar-perf] Disable writing to histogram files by default

Most users don't use the histogram files and instead opt for sending
metrics to prometheus, etc, so there's no need to have this enabled by
default.

Instead, add a new --histogram-file parameter to pulsar-perf
produce/consume which, when specified, dumps the contents of the
internal histogram to the given filename.

Previous behaviour can be achieved with the following options:

  $ pulsar-perf produce --histogram-file perf-producer-$(date +%s).hgrm

* [pulsar-perf] Update docs with --histogram-file param

(cherry picked from commit 48de2e2)
zymap pushed a commit that referenced this pull request Dec 23, 2021
* [pulsar-perf] Write histogram files for consume command

* [pulsar-perf] Disable writing to histogram files by default

Most users don't use the histogram files and instead opt for sending
metrics to prometheus, etc, so there's no need to have this enabled by
default.

Instead, add a new --histogram-file parameter to pulsar-perf
produce/consume which, when specified, dumps the contents of the
internal histogram to the given filename.

Previous behaviour can be achieved with the following options:

  $ pulsar-perf produce --histogram-file perf-producer-$(date +%s).hgrm

* [pulsar-perf] Update docs with --histogram-file param

(cherry picked from commit 48de2e2)
@zymap zymap added the cherry-picked/branch-2.8 Archived: 2.8 is end of life label Dec 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli cherry-picked/branch-2.8 Archived: 2.8 is end of life doc-not-needed Your PR changes do not impact docs release/2.8.3 type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants