This is an automated email from the ASF dual-hosted git repository.
markrmiller pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new 64d2b63 SOLR-15580: Allow setting the base work directory to another
location for the benchmark module.
64d2b63 is described below
commit 64d2b637cf1b0c091eec2b18258b8fe2c088188d
Author: [email protected] <[email protected]>
AuthorDate: Tue Aug 10 12:01:08 2021 -0500
SOLR-15580: Allow setting the base work directory to another location for
the benchmark module.
---
solr/benchmark/README.md | 15 +++++++++++++++
solr/benchmark/log4j2-bench.xml | 4 ++--
.../src/java/org/apache/solr/bench/MiniClusterState.java | 2 +-
3 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/solr/benchmark/README.md b/solr/benchmark/README.md
index e861b19..bbcd418 100644
--- a/solr/benchmark/README.md
+++ b/solr/benchmark/README.md
@@ -102,6 +102,21 @@ JMH comes with a variety of built-in profilers. Here is an
example of using JFR:
In this example we point to the included configuration file with configName,
but you could also do something like
settings=default or settings=profile.
+### Benchmark Outputs
+
+By default, output that benchmarks generate is created in the build/work
directory. You can change this location by setting the workBaseDir system
property like this:
+
+ -jvmArgsAppend -DworkBaseDir=/data3/bench_work
+
+If a profiler generates output, it will generally be written to the current
working directory - that is the benchmark module directory itself. You can
usually change this via the dir option, for example:
+
+ ./jmh.sh -prof jfr:dir=build/work/profile-results JsonFaceting
+
+### Using a Separate MiniCluster Base Directory
+
+If you have a special case MiniCluster you have generated, such as one you
have prepared with very large indexes for a search benchmark run, you can
change the base directory used by the profiler
+for the MiniCluster with the miniClusterBaseDir system property. This is for
search based benchmarks in general and the MiniCluster wil not be removed
automatically by the benchmark.
+
### JMH Options
Some common JMH options are:
diff --git a/solr/benchmark/log4j2-bench.xml b/solr/benchmark/log4j2-bench.xml
index f0fd876..99c0903 100644
--- a/solr/benchmark/log4j2-bench.xml
+++ b/solr/benchmark/log4j2-bench.xml
@@ -48,8 +48,8 @@
<RollingRandomAccessFile
name="SlowLogFile"
- fileName="${sys:solr.log.dir}/${sys:solr.log.name}_slow_requests.log"
-
filePattern="${sys:solr.log.dir}/${sys:solr.log.name}_slow_requests.log.%i">
+
fileName="${sys:solr.log.dir:-work/solr-logs}/${sys:solr.log.name:-solr}_slow_requests.log"
+
filePattern="${sys:solr.log.dir:-work/solr-logs}/${sys:solr.log.name:-solr}_slow_requests.log.%i">
<PatternLayout>
<Pattern>
%maxLen{%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p (%t)
[%notEmpty{c:%X{collection}}%notEmpty{ s:%X{shard}}%notEmpty{
r:%X{replica}}%notEmpty{ x:%X{core}}] %c{1.}
diff --git
a/solr/benchmark/src/java/org/apache/solr/bench/MiniClusterState.java
b/solr/benchmark/src/java/org/apache/solr/bench/MiniClusterState.java
index b2beb12..18f3c2c 100755
--- a/solr/benchmark/src/java/org/apache/solr/bench/MiniClusterState.java
+++ b/solr/benchmark/src/java/org/apache/solr/bench/MiniClusterState.java
@@ -100,7 +100,7 @@ public class MiniClusterState {
/** The Mini cluster base dir. */
Path miniClusterBaseDir;
- /** The Allow cluster reuse. */
+ /** To Allow cluster reuse. */
boolean allowClusterReuse = false;
/** The Is warmup. */