-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: improve descriptions and setup steps
- Loading branch information
1 parent
e5cd512
commit e1d7432
Showing
5 changed files
with
90 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,35 @@ | ||
# kotlinx-benchmark Examples Guide | ||
|
||
This guide is designed to help you navigate, set up, and run the benchmark examples provided here. Whether you're a seasoned developer or new to Kotlin and benchmarking, we've got you covered. Let's dive in and explore these practical examples together. | ||
|
||
## Prerequisites | ||
|
||
Before you begin, ensure you have the following installed on your local machine: | ||
|
||
- Git: Used to clone the repository. You can download it from [here](https://git-scm.com/downloads). | ||
- Gradle: Used to build the projects. You can download it from [here](https://gradle.org/install/). Note that the projects come with a Gradle wrapper, so this is optional. | ||
This guide is specifically designed for experienced Kotlin developers. It aims to help you smoothly navigate and run the benchmark examples included in this repository. | ||
|
||
## Getting Started | ||
|
||
1. **Clone the Repository**: Clone the `kotlinx-benchmark` repository to your local machine by running the following command in your terminal: | ||
|
||
``` | ||
git clone https://github.com/Kotlin/kotlinx-benchmark.git | ||
``` | ||
|
||
2. **Navigate to the Examples Directory**: Once the repository is cloned, navigate to the `examples` directory by running: | ||
To begin, you'll need to clone the `kotlinx-benchmark` repository to your local machine: | ||
|
||
``` | ||
cd kotlinx-benchmark/examples | ||
``` | ||
``` | ||
git clone https://github.com/Kotlin/kotlinx-benchmark.git | ||
``` | ||
|
||
## Running the Examples | ||
|
||
Each example is a separate project that can be built and run independently. Here's how you can do it: | ||
Each example in this repository is an autonomous project, encapsulated in its own environment. Reference the [tasks-overview](../docs/tasks-overview.md) for a detailed list and explanation of available tasks. | ||
|
||
1. **Navigate to the Example Directory**: Navigate to the directory of the example you want to run. For instance, if you want to run the `kotlin-kts` example, you would run: | ||
To execute all benchmarks for a specific example, you'll use the following command structure: | ||
|
||
``` | ||
cd kotlin-kts | ||
``` | ||
``` | ||
./gradlew :examples:[example-name]:benchmark | ||
``` | ||
|
||
2. **Build the Project**: Each project uses Gradle as a build tool. If you have Gradle installed on your machine, you can build the project by running: | ||
Here, `[example-name]` is the name of the example you wish to benchmark. For instance, to run benchmarks for the `kotlin-kts` example, the command would be: | ||
|
||
``` | ||
gradle build | ||
``` | ||
``` | ||
./gradlew :examples:kotlin-kts:benchmark | ||
``` | ||
|
||
3. **Run the Benchmark**: After the project is built, you can run the benchmark by executing: | ||
|
||
``` | ||
gradle benchmark | ||
``` | ||
|
||
Repeat these steps for each example you want to run. | ||
This pattern applies to all examples in the repository. | ||
|
||
## Troubleshooting | ||
|
||
If you encounter any issues while setting up or running the examples, please check the following: | ||
|
||
- Ensure you have all the prerequisites installed and they are added to your system's PATH. | ||
- Make sure you are running the commands in the correct directory. | ||
|
||
If you're still having issues, feel free to open an issue on the [kotlinx-benchmark repository](https://github.com/Kotlin/kotlinx-benchmark/issues). | ||
In case of any issues encountered while setting up or running the benchmarks, verify that you're executing commands from the correct directory. For persisting issues, don't hesitate to open an [issue](https://github.com/Kotlin/kotlinx-benchmark/issues). | ||
|
||
Happy benchmarking! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters