[ 
https://issues.apache.org/jira/browse/LANG-1585?focusedWorklogId=452348&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-452348
 ]

ASF GitHub Bot logged work on LANG-1585:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 29/Jun/20 14:08
            Start Date: 29/Jun/20 14:08
    Worklog Time Spent: 10m 
      Work Description: XenoAmess commented on pull request #574:
URL: https://github.com/apache/commons-lang/pull/574#issuecomment-651146257


   performance test:
   ```
   D:\workspace\commons-lang>mvn -test -Pbenchmark
   [ERROR] Error executing Maven.
   [ERROR] The specified user toolchains file does not exist: 
D:\workspace\commons-lang\est
   
   D:\workspace\commons-lang>mvn test -Pbenchmark
   [INFO] Scanning for projects...
   [INFO]
   [INFO] ------------------< org.apache.commons:commons-lang3 
>------------------
   [INFO] Building Apache Commons Lang 3.11-SNAPSHOT
   [INFO] --------------------------------[ jar 
]---------------------------------
   [INFO]
   [INFO] --- maven-enforcer-plugin:3.0.0-M3:enforce (enforce-maven-version) @ 
commons-lang3 ---
   [INFO]
   [INFO] --- maven-enforcer-plugin:3.0.0-M3:enforce (enforce-maven-3) @ 
commons-lang3 ---
   [INFO]
   [INFO] --- apache-rat-plugin:0.13:check (rat-check) @ commons-lang3 ---
   [INFO] Enabled default license matchers.
   [INFO] Will parse SCM ignores for exclusions...
   [INFO] Parsing exclusions from D:\workspace\commons-lang\.gitignore
   [INFO] Finished adding exclusions from SCM ignore files.
   [INFO] 73 implicit excludes (use -debug for more details).
   [INFO] 14 explicit excludes (use -debug for more details).
   [INFO] 434 resources included (use -debug for more details)
   [INFO] Rat check: Summary over all files. Unapproved: 0, unknown: 0, 
generated: 0, approved: 429 licenses.
   [INFO]
   [INFO] --- build-helper-maven-plugin:3.1.0:parse-version (parse-version) @ 
commons-lang3 ---
   [INFO]
   [INFO] --- maven-antrun-plugin:1.8:run (javadoc.resources) @ commons-lang3 
---
   [INFO] Executing tasks
   
   main:
   [INFO] Executed tasks
   [INFO]
   [INFO] --- maven-remote-resources-plugin:1.7.0:process 
(process-resource-bundles) @ commons-lang3 ---
   [INFO] Skipping remote resources execution.
   [INFO]
   [INFO] --- buildnumber-maven-plugin:1.4:create (default) @ commons-lang3 ---
   [INFO] Executing: cmd.exe /X /C "git rev-parse --verify HEAD"
   [INFO] Working directory: D:\workspace\commons-lang
   [INFO] Storing buildNumber: 8bdc0147b17432607900eae83d36ec15f715f203 at 
timestamp: 1593431635461
   [INFO] Storing buildScmBranch: refine_normalizeSpace
   [INFO]
   [INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ 
commons-lang3 ---
   [INFO] Using 'ISO-8859-1' encoding to copy filtered resources.
   [INFO] skip non existing resourceDirectory 
D:\workspace\commons-lang\src\main\resources
   [INFO] Copying 2 resources to META-INF
   [INFO]
   [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ 
commons-lang3 ---
   [INFO] Changes detected - recompiling the module!
   [INFO] Compiling 210 source files to D:\workspace\commons-lang\target\classes
   [INFO] 
/D:/workspace/commons-lang/src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java:
 Some input files use or ove
   rride a deprecated API.
   [INFO] 
/D:/workspace/commons-lang/src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java:
 Recompile with -Xlint:depre
   cation for details.
   [INFO] 
/D:/workspace/commons-lang/src/main/java/org/apache/commons/lang3/function/FailablePredicate.java:
 Some input files use u
   nchecked or unsafe operations.
   [INFO] 
/D:/workspace/commons-lang/src/main/java/org/apache/commons/lang3/function/FailablePredicate.java:
 Recompile with -Xlint:
   unchecked for details.
   [INFO]
   [INFO] --- maven-bundle-plugin:4.2.1:manifest (bundle-manifest) @ 
commons-lang3 ---
   [INFO]
   [INFO] --- animal-sniffer-maven-plugin:1.18:check (checkAPIcompatibility) @ 
commons-lang3 ---
   [INFO] Checking unresolved references to 
org.codehaus.mojo.signature:java18:1.0
   [INFO]
   [INFO] --- maven-resources-plugin:3.1.0:testResources 
(default-testResources) @ commons-lang3 ---
   [INFO] Using 'ISO-8859-1' encoding to copy filtered resources.
   [INFO] Copying 2 resources
   [INFO] Copying 2 resources to META-INF
   [INFO]
   [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ 
commons-lang3 ---
   [INFO] Changes detected - recompiling the module!
   [INFO] Compiling 183 source files to 
D:\workspace\commons-lang\target\test-classes
   [INFO] 
/D:/workspace/commons-lang/src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java:
 Some input files use or ove
   rride a deprecated API.
   [INFO] 
/D:/workspace/commons-lang/src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java:
 Recompile with -Xlint:depre
   cation for details.
   [INFO] 
/D:/workspace/commons-lang/src/test/java/org/apache/commons/lang3/builder/ReflectionDiffBuilderTest.java:
 Some input file
   s use unchecked or unsafe operations.
   [INFO] 
/D:/workspace/commons-lang/src/test/java/org/apache/commons/lang3/builder/ReflectionDiffBuilderTest.java:
 Recompile with
   -Xlint:unchecked for details.
   [INFO]
   [INFO] --- jacoco-maven-plugin:0.8.5:prepare-agent (prepare-agent) @ 
commons-lang3 ---
   [INFO] Skipping JaCoCo execution because property jacoco.skip is set.
   [INFO]
   [INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-test) @ 
commons-lang3 ---
   [INFO] Tests are skipped.
   [INFO]
   [INFO] --- exec-maven-plugin:1.6.0:exec (benchmark) @ commons-lang3 ---
   WARNING: An illegal reflective access operation has occurred
   WARNING: Illegal reflective access by org.openjdk.jmh.util.Utils 
(file:/C:/Users/xenoa/.m2/repository/org/openjdk/jmh/jmh-core/1
   .21/jmh-core-1.21.jar) to field java.io.PrintStream.charOut
   WARNING: Please consider reporting this to the maintainers of 
org.openjdk.jmh.util.Utils
   WARNING: Use --illegal-access=warn to enable warnings of further illegal 
reflective access operations
   WARNING: All illegal access operations will be denied in a future release
   # JMH version: 1.21
   # VM version: JDK 13.0.2, OpenJDK 64-Bit Server VM, 13.0.2+8
   # VM invoker: C:\jdk-13.0.2+8\bin\java.exe
   # VM options: <none>
   # Warmup: 5 iterations, 10 s each
   # Measurement: 5 iterations, 10 s each
   # Timeout: 10 min per iteration
   # Threads: 1 thread, will synchronize iterations
   # Benchmark mode: Average time, time/op
   # Benchmark: org.apache.commons.lang3.StringUtilsNormalizeSpaceTest.testNew
   
   # Run progress: 0.00% complete, ETA 00:25:00
   # Fork: 1 of 5
   # Warmup Iteration   1: 1834.346 ns/op
   # Warmup Iteration   2: 1827.928 ns/op
   # Warmup Iteration   3: 1835.768 ns/op
   # Warmup Iteration   4: 1871.501 ns/op
   # Warmup Iteration   5: 1922.752 ns/op
   Iteration   1: 1899.908 ns/op
   Iteration   2: 1792.720 ns/op
   Iteration   3: 1809.678 ns/op
   Iteration   4: 1814.104 ns/op
   Iteration   5: 1812.756 ns/op
   
   # Run progress: 6.67% complete, ETA 00:23:27
   # Fork: 2 of 5
   # Warmup Iteration   1: 1797.989 ns/op
   # Warmup Iteration   2: 1756.902 ns/op
   # Warmup Iteration   3: 1797.780 ns/op
   # Warmup Iteration   4: 1782.682 ns/op
   # Warmup Iteration   5: 1759.567 ns/op
   Iteration   1: 1771.699 ns/op
   Iteration   2: 1788.107 ns/op
   Iteration   3: 1854.395 ns/op
   Iteration   4: 1896.490 ns/op
   Iteration   5: 1889.002 ns/op
   
   # Run progress: 13.33% complete, ETA 00:21:46
   # Fork: 3 of 5
   # Warmup Iteration   1: 1817.981 ns/op
   # Warmup Iteration   2: 1948.958 ns/op
   # Warmup Iteration   3: 1843.334 ns/op
   # Warmup Iteration   4: 1828.277 ns/op
   # Warmup Iteration   5: 1760.052 ns/op
   Iteration   1: 1796.255 ns/op
   Iteration   2: 1774.991 ns/op
   Iteration   3: 1789.979 ns/op
   Iteration   4: 1812.019 ns/op
   Iteration   5: 1808.545 ns/op
   
   # Run progress: 20.00% complete, ETA 00:20:05
   # Fork: 4 of 5
   # Warmup Iteration   1: 1787.221 ns/op
   # Warmup Iteration   2: 1713.701 ns/op
   # Warmup Iteration   3: 1770.595 ns/op
   # Warmup Iteration   4: 1726.155 ns/op
   # Warmup Iteration   5: 1772.947 ns/op
   Iteration   1: 1719.565 ns/op
   Iteration   2: 1748.288 ns/op
   Iteration   3: 1806.884 ns/op
   Iteration   4: 1768.795 ns/op
   Iteration   5: 1768.458 ns/op
   
   # Run progress: 26.67% complete, ETA 00:18:25
   # Fork: 5 of 5
   # Warmup Iteration   1: 1903.229 ns/op
   # Warmup Iteration   2: 1789.836 ns/op
   # Warmup Iteration   3: 1852.801 ns/op
   # Warmup Iteration   4: 1811.882 ns/op
   # Warmup Iteration   5: 1824.855 ns/op
   Iteration   1: 1830.908 ns/op
   Iteration   2: 1820.079 ns/op
   Iteration   3: 1831.909 ns/op
   Iteration   4: 1876.281 ns/op
   Iteration   5: 1781.799 ns/op
   
   
   Result "org.apache.commons.lang3.StringUtilsNormalizeSpaceTest.testNew":
     1810.545 ?99.9%) 34.015 ns/op [Average]
   
     (min, avg, max) = (1719.565, 1810.545, 1899.908), stdev = 45.409
     CI (99.9%): [1776.530, 1844.560] (assumes normal distribution)
   
   
   # JMH version: 1.21
   # VM version: JDK 13.0.2, OpenJDK 64-Bit Server VM, 13.0.2+8
   # VM invoker: C:\jdk-13.0.2+8\bin\java.exe
   # VM options: <none>
   # Warmup: 5 iterations, 10 s each
   # Measurement: 5 iterations, 10 s each
   # Timeout: 10 min per iteration
   # Threads: 1 thread, will synchronize iterations
   # Benchmark mode: Average time, time/op
   # Benchmark: org.apache.commons.lang3.StringUtilsNormalizeSpaceTest.testNew2
   
   # Run progress: 33.33% complete, ETA 00:16:44
   # Fork: 1 of 5
   # Warmup Iteration   1: 534.646 ns/op
   # Warmup Iteration   2: 539.029 ns/op
   # Warmup Iteration   3: 509.231 ns/op
   # Warmup Iteration   4: 497.470 ns/op
   # Warmup Iteration   5: 474.904 ns/op
   Iteration   1: 498.163 ns/op
   Iteration   2: 486.262 ns/op
   Iteration   3: 479.665 ns/op
   Iteration   4: 541.067 ns/op
   Iteration   5: 512.358 ns/op
   
   # Run progress: 40.00% complete, ETA 00:15:04
   # Fork: 2 of 5
   # Warmup Iteration   1: 488.300 ns/op
   # Warmup Iteration   2: 482.747 ns/op
   # Warmup Iteration   3: 478.509 ns/op
   # Warmup Iteration   4: 482.006 ns/op
   # Warmup Iteration   5: 492.552 ns/op
   Iteration   1: 492.892 ns/op
   Iteration   2: 492.203 ns/op
   Iteration   3: 477.694 ns/op
   Iteration   4: 486.161 ns/op
   Iteration   5: 515.932 ns/op
   
   # Run progress: 46.67% complete, ETA 00:13:24
   # Fork: 3 of 5
   # Warmup Iteration   1: 492.941 ns/op
   # Warmup Iteration   2: 485.250 ns/op
   # Warmup Iteration   3: 495.137 ns/op
   # Warmup Iteration   4: 487.420 ns/op
   # Warmup Iteration   5: 485.729 ns/op
   Iteration   1: 484.238 ns/op
   Iteration   2: 490.584 ns/op
   Iteration   3: 488.276 ns/op
   Iteration   4: 475.611 ns/op
   Iteration   5: 474.632 ns/op
   
   # Run progress: 53.33% complete, ETA 00:11:43
   # Fork: 4 of 5
   # Warmup Iteration   1: 477.954 ns/op
   # Warmup Iteration   2: 482.297 ns/op
   # Warmup Iteration   3: 505.332 ns/op
   # Warmup Iteration   4: 517.942 ns/op
   # Warmup Iteration   5: 510.754 ns/op
   Iteration   1: 473.334 ns/op
   Iteration   2: 464.616 ns/op
   Iteration   3: 474.372 ns/op
   Iteration   4: 471.003 ns/op
   Iteration   5: 468.878 ns/op
   
   # Run progress: 60.00% complete, ETA 00:10:02
   # Fork: 5 of 5
   # Warmup Iteration   1: 476.593 ns/op
   # Warmup Iteration   2: 461.720 ns/op
   # Warmup Iteration   3: 470.009 ns/op
   # Warmup Iteration   4: 476.820 ns/op
   # Warmup Iteration   5: 484.944 ns/op
   Iteration   1: 468.847 ns/op
   Iteration   2: 468.500 ns/op
   Iteration   3: 463.607 ns/op
   Iteration   4: 479.116 ns/op
   Iteration   5: 481.087 ns/op
   
   
   Result "org.apache.commons.lang3.StringUtilsNormalizeSpaceTest.testNew2":
     484.364 ?99.9%) 13.339 ns/op [Average]
   
     (min, avg, max) = (463.607, 484.364, 541.067), stdev = 17.807
     CI (99.9%): [471.025, 497.703] (assumes normal distribution)
   
   
   # JMH version: 1.21
   # VM version: JDK 13.0.2, OpenJDK 64-Bit Server VM, 13.0.2+8
   # VM invoker: C:\jdk-13.0.2+8\bin\java.exe
   # VM options: <none>
   # Warmup: 5 iterations, 10 s each
   # Measurement: 5 iterations, 10 s each
   # Timeout: 10 min per iteration
   # Threads: 1 thread, will synchronize iterations
   # Benchmark mode: Average time, time/op
   # Benchmark: org.apache.commons.lang3.StringUtilsNormalizeSpaceTest.testOld
   
   # Run progress: 66.67% complete, ETA 00:08:22
   # Fork: 1 of 5
   # Warmup Iteration   1: 625.352 ns/op
   # Warmup Iteration   2: 592.201 ns/op
   # Warmup Iteration   3: 603.101 ns/op
   # Warmup Iteration   4: 603.951 ns/op
   # Warmup Iteration   5: 613.754 ns/op
   Iteration   1: 636.288 ns/op
   Iteration   2: 608.138 ns/op
   Iteration   3: 610.671 ns/op
   Iteration   4: 617.411 ns/op
   Iteration   5: 621.949 ns/op
   
   # Run progress: 73.33% complete, ETA 00:06:41
   # Fork: 2 of 5
   # Warmup Iteration   1: 619.450 ns/op
   # Warmup Iteration   2: 615.049 ns/op
   # Warmup Iteration   3: 616.933 ns/op
   # Warmup Iteration   4: 614.417 ns/op
   # Warmup Iteration   5: 631.779 ns/op
   Iteration   1: 670.043 ns/op
   Iteration   2: 677.597 ns/op
   Iteration   3: 624.590 ns/op
   Iteration   4: 616.610 ns/op
   Iteration   5: 624.361 ns/op
   
   # Run progress: 80.00% complete, ETA 00:05:01
   # Fork: 3 of 5
   # Warmup Iteration   1: 627.981 ns/op
   # Warmup Iteration   2: 616.773 ns/op
   # Warmup Iteration   3: 606.682 ns/op
   # Warmup Iteration   4: 608.450 ns/op
   # Warmup Iteration   5: 616.063 ns/op
   Iteration   1: 628.244 ns/op
   Iteration   2: 607.740 ns/op
   Iteration   3: 607.944 ns/op
   Iteration   4: 587.519 ns/op
   Iteration   5: 630.937 ns/op
   
   # Run progress: 86.67% complete, ETA 00:03:20
   # Fork: 4 of 5
   # Warmup Iteration   1: 627.827 ns/op
   # Warmup Iteration   2: 608.407 ns/op
   # Warmup Iteration   3: 611.014 ns/op
   # Warmup Iteration   4: 601.263 ns/op
   # Warmup Iteration   5: 591.495 ns/op
   Iteration   1: 607.002 ns/op
   Iteration   2: 617.053 ns/op
   Iteration   3: 600.827 ns/op
   Iteration   4: 596.361 ns/op
   Iteration   5: 600.819 ns/op
   
   # Run progress: 93.33% complete, ETA 00:01:40
   # Fork: 5 of 5
   # Warmup Iteration   1: 626.593 ns/op
   # Warmup Iteration   2: 619.569 ns/op
   # Warmup Iteration   3: 604.360 ns/op
   # Warmup Iteration   4: 602.134 ns/op
   # Warmup Iteration   5: 653.027 ns/op
   Iteration   1: 657.795 ns/op
   Iteration   2: 676.300 ns/op
   Iteration   3: 735.786 ns/op
   Iteration   4: 685.390 ns/op
   Iteration   5: 643.379 ns/op
   
   
   Result "org.apache.commons.lang3.StringUtilsNormalizeSpaceTest.testOld":
     631.630 ?99.9%) 25.964 ns/op [Average]
   
     (min, avg, max) = (587.519, 631.630, 735.786), stdev = 34.661
     CI (99.9%): [605.667, 657.594] (assumes normal distribution)
   
   
   # Run complete. Total time: 00:25:07
   
   REMEMBER: The numbers below are just data. To gain reusable insights, you 
need to follow up on
   why the numbers are the way they are. Use profilers (see -prof, -lprof), 
design factorial
   experiments, perform baseline and negative tests that provide experimental 
control, make sure
   the benchmarking environment is safe on JVM/OS/HW level, ask for reviews 
from the domain experts.
   Do not assume the numbers tell you what you want them to tell.
   
   Benchmark                               Mode  Cnt     Score    Error  Units
   StringUtilsNormalizeSpaceTest.testNew   avgt   25  1810.545 ?34.015  ns/op
   
   StringUtilsNormalizeSpaceTest.testNew2  avgt   25   484.364 ?13.339  ns/op
   
   StringUtilsNormalizeSpaceTest.testOld   avgt   25   631.630 ?25.964  ns/op
   
   
   Benchmark result is saved to target/jmh-result.org.apache.json
   [INFO] 
------------------------------------------------------------------------
   [INFO] BUILD SUCCESS
   [INFO] 
------------------------------------------------------------------------
   [INFO] Total time:  25:38 min
   [INFO] Finished at: 2020-06-29T20:19:28+08:00
   [INFO] 
------------------------------------------------------------------------
   
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 452348)
    Remaining Estimate: 0h
            Time Spent: 10m

> refine performance of StringUtils.normalizeSpace
> ------------------------------------------------
>
>                 Key: LANG-1585
>                 URL: https://issues.apache.org/jira/browse/LANG-1585
>             Project: Commons Lang
>          Issue Type: Sub-task
>            Reporter: Jin Xu
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> [https://github.com/apache/commons-lang/pull/574]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to