Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
guillermocalvo committed Jul 12, 2024
2 parents 15bd7ab + 85556f0 commit 04e3819
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 11 deletions.
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

[![Latest Report][BADGE_TIMES_FASTER]][TIMES_FASTER]
[![Latest Report][BADGE_TIMES_FASTER]][BENCHMARK]

# Result Library Benchmarks

Expand All @@ -15,7 +15,8 @@ There are simple and complex scenarios to compare performance when using results

### Simple Scenarios

The first scenarios compare the most basic usage: a method that returns a `String` or fails, depending on a given `int` parameter:
The first scenarios compare the most basic usage: a method that returns a `String` or fails, depending on a given `int`
parameter:

#### Using Exceptions

Expand All @@ -41,7 +42,8 @@ public Result<String, SimpleFailure> usingResults(int number) {

### Complex Scenarios

The next scenarios do something a little bit more elaborate: a method invokes the previous method to retrieve a `String`; if successful, then converts it to upper case; otherwise transforms the "simple" error into a "complex" error.
The next scenarios do something a little bit more elaborate: a method invokes the previous method to retrieve a
`String`; if successful, then converts it to upper case; otherwise transforms the "simple" error into a "complex" error.

#### Using Exceptions

Expand Down Expand Up @@ -69,9 +71,11 @@ public Result<String, ComplexFailure> usingResults(int number) {

> [!IMPORTANT]
>
> The report you can see [here][BENCHMARK] was generated on a [GitHub-hosted runner][GITHUB_HOSTED_RUNNER] using the latest [Ubuntu][UBUNTU_RUNNER] image and the latest [Azul Zulu OpenJDK][AZUL_ZULU_OPENJDK] version.
> Performance measurements may vary depending on different factors such as architecture, operating system, or Java virtual machine.
> Please remember that you should run your own benchmarks to make informed decisions for your specific project.
> The report you can see [here][BENCHMARK] was generated on a [GitHub-hosted runner][GITHUB_HOSTED_RUNNER] using the
> latest [Ubuntu][UBUNTU_RUNNER] image and the latest [Azul Zulu OpenJDK][AZUL_ZULU_OPENJDK] version.
> Performance measurements may vary depending on different factors such as architecture, operating system, or Java
> virtual machine. Please remember that you should run your own benchmarks to make informed decisions for your specific
> project.

To run the [JMH benchmarks][JMH] locally, execute this command:

Expand Down Expand Up @@ -136,6 +140,5 @@ See the License for the specific language governing permissions and limitations
[GUILLERMO_IMAGE]: https://guillermo.dev/assets/images/thumb.png
[JMH]: https://openjdk.org/projects/code-tools/jmh/
[JMH_VISUALIZER]: https://github.com/jzillmann/jmh-visualizer/
[RESULT]: https://dev.leakyabstractions.com/result/
[TIMES_FASTER]: https://dev.leakyabstractions.com/result-benchmark/
[RESULT]: https://result.leakyabstractions.com/
[UBUNTU_RUNNER]: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=a4b4158601f8636cdeeab09bd76afb640030bb5b144aafe261a5e8af027dc612
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
5 changes: 4 additions & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
2 changes: 2 additions & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down

0 comments on commit 04e3819

Please sign in to comment.