The PerL is the core of SBK framework. The PerL provides the foundation APIs for performance benchmarking, storing latency values and calculating percentiles. The APIs of PerL are used by SBK-API module to define the readers and writers interfaces. The Latency store methods/classes are used by SBK-API and SBK-RAM. The PerL module can be used by any application for performance benchmarking.
If you want to conduct the performance benchmarking without read and write interfaces/APIs, then PerL can be used. The PerL provides the APIs for performance benchmarking which can used for other than storage systems. PerL can be used for performance benchmarking of any software system.
repositories {
mavenCentral()
}
dependencies {
implementation 'io.github.kmgowda:perl:0.96'
}
Note that 'mavenCentral()' repository is required to fetch the SBK APIs package and its dependencies.
repositories {
mavenCentral()
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/kmgowda/SBK")
credentials {
username = "sbk-public"
password = "\u0067hp_FBqmGRV6KLTcFjwnDTvozvlhs3VNja4F67B5"
}
}
}
dependencies {
implementation 'sbk:perl:0.96'
}
repositories {
mavenCentral()
maven {
url 'https://jitpack.io'
}
}
dependencies {
implementation 'com.github.kmgowda.SBK:perl:0.96'
}
Note that 'mavenCentral()' repository is required to fetch the SBK APIs package and its dependencies.
-
Use PerlBuilder.build API to create and get the Concurrent queue based Perl interface.
- see the example : https://github.com/kmgowda/SBK/blob/master/sbk-api/src/main/java/io/sbk/api/impl/SbkBenchmark.java#L93
- see the Junit test example : https://github.com/kmgowda/SBK/blob/master/perl/src/test/java/io/perl/test/PerlTest.java#L80
- The created Perl interface object can be distributed among several threads.
-
Use getPerlChannel API to get the perl channel.
- Multiple threads can invoke this API to get the dedicated PerlChannel object.
- This dedicated PerlChannel is not thread safe hence it should not be used distributed among multiple threads
- See the example : https://github.com/kmgowda/SBK/blob/master/sbk-api/src/main/java/io/sbk/api/impl/SbkBenchmark.java#L177
- See the Junit test example : https://github. com/kmgowda/SBK/blob/master/perl/src/test/java/io/perl/test/PerlTest.java#L83
-
start the benchmarking using Run API
-
you send the performance data to Perl channel using send API
- see the example : https://github.com/kmgowda/SBK/blob/master/sbk-api/src/main/java/io/sbk/api/Writer.java#L97
- See the Junit example to send the performance data with multiple threads : https://github.com/kmgowda/SBK/blob/master/perl/src/test/java/io/perl/test/PerlTest.java#L95
-
in case of any exception, you can send the exception
-
The Perl will periodically sends/prints the performance results to logger/printer which is supplied with PerlBuilder.build API in step 1.
-
stop the benchmarking using Stop API