Skip to content

Commit

Permalink
update TransferAssets.kt
Browse files Browse the repository at this point in the history
Signed-off-by: timofeevmd <[email protected]>
  • Loading branch information
timofeevmd committed May 21, 2024
1 parent d0dad0a commit 2139e0f
Show file tree
Hide file tree
Showing 5 changed files with 3,850 additions and 50,779 deletions.
9 changes: 5 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<maven-compiler-plugin.version>3.5.1</maven-compiler-plugin.version>
<maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
<owner.version>1.0.12</owner.version>
<iroha-java.version>50cb33b</iroha-java.version>
<iroha-java.version>7832163811</iroha-java.version>
<jackson.versaion>2.14.1</jackson.versaion>
<commons-codec.version>1.15</commons-codec.version>
<lombok.version>1.18.24</lombok.version>
Expand Down Expand Up @@ -102,17 +102,18 @@
<version>${owner.version}</version>
</dependency>
<dependency>
<groupId>jp.co.soramitsu.iroha2-java</groupId>
<!--groupId>jp.co.soramitsu.iroha2-java</groupId-->
<groupId>com.github.hyperledger.iroha-java</groupId>
<artifactId>admin-client</artifactId>
<version>${iroha-java.version}</version>
</dependency>
<dependency>
<groupId>jp.co.soramitsu.iroha2-java</groupId>
<groupId>com.github.hyperledger.iroha-java</groupId>
<artifactId>model</artifactId>
<version>${iroha-java.version}</version>
</dependency>
<dependency>
<groupId>jp.co.soramitsu.iroha2-java</groupId>
<groupId>com.github.hyperledger.iroha-java</groupId>
<artifactId>block</artifactId>
<version>${iroha-java.version}</version>
</dependency>
Expand Down
61 changes: 4 additions & 57 deletions src/main/kotlin/jp/co/soramitsu/load/TransferAssets.kt
Original file line number Diff line number Diff line change
Expand Up @@ -49,71 +49,18 @@ class TransferAssets : Wrench13() {
}
.exec { Session ->
runBlocking {
//var timer: Histogram.Timer
//
//timer = CustomMetrics.subscriptionToBlockStreamTimer.labels(
// "gatling",
// System.getProperty("user.dir").substringAfterLast("/").substringAfterLast("\\"),
// Iroha2SetUp::class.simpleName
//).startTimer()
/* val idToSubscription = iroha2Client.subscribeToBlockStream(1, 2)
val subscription = idToSubscription.second*/
//timer.observeDuration()
//CustomMetrics.subscriptionToBlockStreamCount.labels(
// "gatling",
// System.getProperty("user.dir").substringAfterLast("/").substringAfterLast("\\"),
// Iroha2SetUp::class.simpleName
//).inc()
//sendMetricsToPrometheus(CustomMetrics.subscriptionToBlockStreamCount, "transaction")
//sendMetricsToPrometheus(CustomMetrics.subscriptionToBlockStreamTimer, "transaction")
//timer = CustomMetrics.transferAssetTimer.labels(
// "gatling",
// System.getProperty("user.dir").substringAfterLast("/").substringAfterLast("\\"),
// Iroha2SetUp::class.simpleName
//).startTimer()
//CustomMetrics.transferAssetCount.labels(
// "gatling",
// System.getProperty("user.dir").substringAfterLast("/").substringAfterLast("\\"),
// Iroha2SetUp::class.simpleName
//).inc()
//sendMetricsToPrometheus(CustomMetrics.transferAssetCount, "transaction")
//try {
val iroha2Client = buildClient(SimulationConfig.simulation.configuration())
iroha2Client.fireAndForget {
account(anotherDevAccountIdSender)
transferAsset(anotherDevAssetIdSender, 1, targetDevAccountIdReceiver)
buildSigned(anotherDevKeyPairSender)
}/*.also { d ->
withTimeout(Duration.ofSeconds(transactionWaiter)) {
d.await()
pliers.healthCheck(true, "TransferAssets")
}
}*/
//subscription.stop()
//} catch (ex: RuntimeException) {
// CustomMetrics.transferAssetErrorCount.labels(
// "gatling",
// System.getProperty("user.dir").substringAfterLast("/").substringAfterLast("\\"),
// Iroha2SetUp::class.simpleName
// ).inc()
// sendMetricsToPrometheus(CustomMetrics.transferAssetErrorCount, "transaction")
// println("Something went wrong on TransferAssets scenario, problem with transfer asset transaction: " + ex.message)
// pliers.healthCheck(false, "TransferAssets")
//} finally {
// timer.observeDuration()
// sendMetricsToPrometheus(CustomMetrics.transferAssetTimer, "transaction")
//}
account(anotherDevAccountIdSender)
transferAsset(anotherDevAssetIdSender, 1, targetDevAccountIdReceiver)
buildSigned(anotherDevKeyPairSender)
}
}

Session
}.exec { Session ->
runBlocking {
val iroha2Client = buildClient(SimulationConfig.simulation.configuration())
/*iroha2Client.fireAndForget {
account(anotherDevAccountIdSender)
transferAsset(anotherDevAssetIdSender, 1, targetDevAccountIdReceiver)
buildSigned(anotherDevKeyPairSender)
}*/
iroha2Client.fireAndForget {
account(anotherDevAccountIdSender)
transferAsset(anotherDevAssetIdSender, 1, targetDevAccountIdReceiver)
Expand Down
96 changes: 0 additions & 96 deletions src/test/resources/config.json

This file was deleted.

Loading

0 comments on commit 2139e0f

Please sign in to comment.