-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #422 from ergoplatform/v1.6
prepare branch for version 1.6
- Loading branch information
Showing
159 changed files
with
5,257 additions
and
1,407 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 |
---|---|---|
|
@@ -22,6 +22,7 @@ my*.conf | |
# logs | ||
*.log | ||
*.log.gz | ||
*.tmp | ||
|
||
# binary files | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
sourceDirectory in Jmh := (sourceDirectory in Test).value | ||
classDirectory in Jmh := (classDirectory in Test).value | ||
dependencyClasspath in Jmh := (dependencyClasspath in Test).value | ||
// rewire tasks, so that 'jmh:run' automatically invokes 'jmh:compile' (otherwise a clean 'jmh:run' would fail) | ||
compile in Jmh := (compile in Jmh).dependsOn(compile in Test).value | ||
run in Jmh := (run in Jmh).dependsOn(Keys.compile in Jmh).evaluated |
46 changes: 46 additions & 0 deletions
46
benchmarks/src/test/scala/org/ergoplatform/nodeView/state/ErgoStateBenchmark.scala
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package org.ergoplatform.nodeView.state | ||
|
||
import org.ergoplatform.modifiers.mempool.ErgoTransaction | ||
import org.ergoplatform.nodeView.state.ErgoStateBenchmark.BenchmarkState | ||
import org.ergoplatform.utils.ErgoTestHelpers | ||
import org.openjdk.jmh.annotations._ | ||
import org.openjdk.jmh.infra.Blackhole | ||
import org.openjdk.jmh.profile.GCProfiler | ||
import org.openjdk.jmh.runner.options.OptionsBuilder | ||
import org.openjdk.jmh.runner.{Runner, RunnerException} | ||
|
||
import scala.util.Random | ||
|
||
|
||
class ErgoStateBenchmark { | ||
@Benchmark | ||
def boxChanges(state: BenchmarkState, bh: Blackhole): Unit = { | ||
bh.consume { | ||
ErgoState.boxChanges(state.txs) | ||
} | ||
} | ||
} | ||
|
||
object ErgoStateBenchmark extends ErgoTestHelpers { | ||
|
||
@throws[RunnerException] | ||
def main(args: Array[String]): Unit = { | ||
val opt = new OptionsBuilder() | ||
.include(".*" + classOf[ErgoStateBenchmark].getSimpleName + ".*") | ||
.forks(1) | ||
.addProfiler(classOf[GCProfiler]) | ||
.build | ||
new Runner(opt).run | ||
} | ||
|
||
@State(Scope.Benchmark) | ||
class BenchmarkState { | ||
val blockSize = 1024 * 400 | ||
val txsSeq: Seq[Seq[ErgoTransaction]] = (0 until 5) map { i => | ||
validTransactionsFromBoxHolder(boxesHolderGen.sample.get, new Random, blockSize)._1 | ||
} | ||
|
||
def txs: Seq[ErgoTransaction] = txsSeq(Random.nextInt(txsSeq.length)) | ||
} | ||
|
||
} |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<diagram program="umletino" version="14.2"><zoom_level>10</zoom_level><element><id>UMLClass</id><coordinates><x>78</x><y>30</y><w>150</w><h>100</h></coordinates><panel_attributes>Unspent | ||
Offchain | ||
|
||
creationHeight = None | ||
spendingHeight = None | ||
|
||
|
||
</panel_attributes><additional_attributes></additional_attributes></element><element><id>UMLClass</id><coordinates><x>448</x><y>30</y><w>150</w><h>100</h></coordinates><panel_attributes>Spent | ||
Offchain | ||
|
||
creationHeight = None | ||
spendingHeight = None | ||
</panel_attributes><additional_attributes></additional_attributes></element><element><id>Relation</id><coordinates><x>218</x><y>60</y><w>250</w><h>40</h></coordinates><panel_attributes>lt=<<- | ||
ProcessSpending(atHeight = None)</panel_attributes><additional_attributes>230;20;10;20</additional_attributes></element><element><id>UMLClass</id><coordinates><x>78</x><y>360</y><w>150</w><h>100</h></coordinates><panel_attributes>Unspent | ||
Onchain | ||
|
||
creationHeight = Some | ||
spendingHeight = None | ||
|
||
|
||
</panel_attributes><additional_attributes></additional_attributes></element><element><id>UMLClass</id><coordinates><x>868</x><y>360</y><w>150</w><h>100</h></coordinates><panel_attributes>Spent | ||
Onchain | ||
|
||
creationHeight = Some | ||
spendingHeight = Some | ||
|
||
|
||
</panel_attributes><additional_attributes></additional_attributes></element><element><id>Relation</id><coordinates><x>218</x><y>370</y><w>670</w><h>40</h></coordinates><panel_attributes>lt=<<- | ||
ProcessSpending(atHeight = Some)</panel_attributes><additional_attributes>650;20;10;20</additional_attributes></element><element><id>Relation</id><coordinates><x>888</x><y>120</y><w>220</w><h>260</h></coordinates><panel_attributes>lt=<<- | ||
ProcessSpending(atHeight = Some)</panel_attributes><additional_attributes>10;240;10;10</additional_attributes></element><element><id>Relation</id><coordinates><x>218</x><y>120</y><w>670</w><h>260</h></coordinates><panel_attributes>lt=<<- | ||
ProcessSpending(atHeight = None)</panel_attributes><additional_attributes>650;10;10;240</additional_attributes></element><element><id>Relation</id><coordinates><x>108</x><y>120</y><w>140</w><h>260</h></coordinates><panel_attributes>lt=<<- | ||
CreationConfirmation | ||
</panel_attributes><additional_attributes>10;240;10;10</additional_attributes></element><element><id>UMLClass</id><coordinates><x>868</x><y>30</y><w>150</w><h>100</h></coordinates><panel_attributes>Spent | ||
Offchain | ||
|
||
creationHeight = Some | ||
spendingHeight = None | ||
</panel_attributes><additional_attributes></additional_attributes></element><element><id>Relation</id><coordinates><x>588</x><y>40</y><w>300</w><h>40</h></coordinates><panel_attributes>lt=<<- | ||
CreationConfirmation</panel_attributes><additional_attributes>280;20;10;20</additional_attributes></element><element><id>Relation</id><coordinates><x>178</x><y>120</y><w>340</w><h>260</h></coordinates><panel_attributes>lt=<<- | ||
ProcessRollback(toHeight < creationHeight) | ||
|
||
fg=red</panel_attributes><additional_attributes>50;10;120;120;10;240</additional_attributes></element><element><id>Relation</id><coordinates><x>218</x><y>410</y><w>670</w><h>50</h></coordinates><panel_attributes>lt=<<- | ||
ProcessRollback(creationHeight <= toHeight < spendingHeight) | ||
|
||
fg=red</panel_attributes><additional_attributes>10;20;650;20</additional_attributes></element><element><id>Relation</id><coordinates><x>588</x><y>80</y><w>300</w><h>50</h></coordinates><panel_attributes>lt=<<- | ||
ProcessRollback(toHeight < creationHeight) | ||
|
||
fg=red</panel_attributes><additional_attributes>10;20;280;20</additional_attributes></element><element><id>Relation</id><coordinates><x>28</x><y>90</y><w>890</w><h>450</h></coordinates><panel_attributes>lt=<<- | ||
ProcessRollback(toHeight < creationHeight) | ||
|
||
fg=red</panel_attributes><additional_attributes>50;10;10;10;10;390;40;430;870;430;870;370</additional_attributes></element></diagram> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version=1.1.4 | ||
sbt.version=1.2.1 |
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
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
Oops, something went wrong.