mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-26 13:26:23 +02:00
Fixing a parser benchmark
This commit is contained in:
@@ -26,6 +26,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4
|
|||||||
import com.vitorpamplona.quartz.nip01Core.core.Event
|
import com.vitorpamplona.quartz.nip01Core.core.Event
|
||||||
import com.vitorpamplona.quartz.nip01Core.generateId
|
import com.vitorpamplona.quartz.nip01Core.generateId
|
||||||
import com.vitorpamplona.quartz.nip01Core.jackson.JsonMapper
|
import com.vitorpamplona.quartz.nip01Core.jackson.JsonMapper
|
||||||
|
import com.vitorpamplona.quartz.nip01Core.relay.commands.toClient.EventMessage
|
||||||
import com.vitorpamplona.quartz.nip01Core.verifyId
|
import com.vitorpamplona.quartz.nip01Core.verifyId
|
||||||
import junit.framework.TestCase.assertNotNull
|
import junit.framework.TestCase.assertNotNull
|
||||||
import junit.framework.TestCase.assertTrue
|
import junit.framework.TestCase.assertTrue
|
||||||
@@ -44,8 +45,8 @@ class EventCmdHasherBenchmark {
|
|||||||
@get:Rule val benchmarkRule = BenchmarkRule()
|
@get:Rule val benchmarkRule = BenchmarkRule()
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun checkIDHashKind1WihtoutTags() {
|
fun checkIDHashKind1WithoutTags() {
|
||||||
val event = JsonMapper.fromJson(JsonMapper.mapper.readTree(reqResponseEvent))
|
val event = EventMessage.parse(JsonMapper.mapper.readTree(reqResponseEvent)).event
|
||||||
|
|
||||||
benchmarkRule.measureRepeated {
|
benchmarkRule.measureRepeated {
|
||||||
// Should pass
|
// Should pass
|
||||||
|
Reference in New Issue
Block a user