You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by si...@apache.org on 2019/04/29 06:01:18 UTC
[pulsar] branch master updated: [Issue#4159][pulsar-testclient]
Added ['-p',
'--max-outstanding-across-partitions'] parameter to the producer performance
benchmark (#4160)
This is an automated email from the ASF dual-hosted git repository.
sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new d85b0c9 [Issue#4159][pulsar-testclient] Added ['-p','--max-outstanding-across-partitions'] parameter to the producer performance benchmark (#4160)
d85b0c9 is described below
commit d85b0c93ceb4aa868108b6b16027d304fd873747
Author: kuangye <73...@qq.com>
AuthorDate: Mon Apr 29 14:01:11 2019 +0800
[Issue#4159][pulsar-testclient] Added ['-p','--max-outstanding-across-partitions'] parameter to the producer performance benchmark (#4160)
Fixes: #4159
Master Issue: #4159
**Modifications**
* Added ['-p','--max-multiPartition-outstanding'] parameter to the producer performance benchmark
---
.../main/java/org/apache/pulsar/testclient/PerformanceProducer.java | 6 +++++-
site2/docs/reference-cli-tools.md | 3 +++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/pulsar-testclient/src/main/java/org/apache/pulsar/testclient/PerformanceProducer.java b/pulsar-testclient/src/main/java/org/apache/pulsar/testclient/PerformanceProducer.java
index 1107ebd..3d2536e 100644
--- a/pulsar-testclient/src/main/java/org/apache/pulsar/testclient/PerformanceProducer.java
+++ b/pulsar-testclient/src/main/java/org/apache/pulsar/testclient/PerformanceProducer.java
@@ -89,7 +89,7 @@ public class PerformanceProducer {
@Parameter(names = { "-r", "--rate" }, description = "Publish rate msg/s across topics")
public int msgRate = 100;
- @Parameter(names = { "-s", "--size" }, description = "Message size")
+ @Parameter(names = { "-s", "--size" }, description = "Message size (bytes)")
public int msgSize = 1024;
@Parameter(names = { "-t", "--num-topic" }, description = "Number of topics")
@@ -114,6 +114,9 @@ public class PerformanceProducer {
@Parameter(names = { "-o", "--max-outstanding" }, description = "Max number of outstanding messages")
public int maxOutstanding = 1000;
+ @Parameter(names = { "-p", "--max-outstanding-across-partitions" }, description = "Max number of outstanding messages across partitions")
+ public int maxPendingMessagesAcrossPartitions = 50000;
+
@Parameter(names = { "-c",
"--max-connections" }, description = "Max number of TCP connections to a single broker")
public int maxConnections = 100;
@@ -264,6 +267,7 @@ public class PerformanceProducer {
.sendTimeout(0, TimeUnit.SECONDS) //
.compressionType(arguments.compression) //
.maxPendingMessages(arguments.maxOutstanding) //
+ .maxPendingMessagesAcrossPartitions(arguments.maxPendingMessagesAcrossPartitions)
// enable round robin message routing if it is a partitioned topic
.messageRoutingMode(MessageRoutingMode.RoundRobinPartition);
diff --git a/site2/docs/reference-cli-tools.md b/site2/docs/reference-cli-tools.md
index 5b016b9..c297087 100644
--- a/site2/docs/reference-cli-tools.md
+++ b/site2/docs/reference-cli-tools.md
@@ -407,6 +407,7 @@ $ pulsar-perf consume options
```
Options
+
|Flag|Description|Default|
|---|---|---|
|`--auth_params`|Authentication parameters, whose format is determined by the implementation of method `configure` in authentication plugin class, for example "key1:val1,key2:val2" or "{"key1":"val1","key2":"val2"}.||
@@ -437,6 +438,7 @@ $ pulsar-perf produce options
```
Options
+
|Flag|Description|Default|
|---|---|---|
|`--auth_params`|Authentication parameters, whose format is determined by the implementation of method `configure` in authentication plugin class, for example "key1:val1,key2:val2" or "{"key1":"val1","key2":"val2"}.||
@@ -449,6 +451,7 @@ Options
|`-h`, `--help`|Help message|false|
|`-c`, `--max-connections`|Max number of TCP connections to a single broker|100|
|`-o`, `--max-outstanding`|Max number of outstanding messages|1000|
+|`-p`, `--max-outstanding-across-partitions`|Max number of outstanding messages across partitions|50000|
|`-m`, `--num-messages`|Number of messages to publish in total. If set to 0, it will keep publishing.|0|
|`-n`, `--num-producers`|The number of producers (per topic)|1|
|`-t`, `--num-topic`|The number of topics|1|