Skip to content

Commit

Permalink
fix raw reading
Browse files Browse the repository at this point in the history
  • Loading branch information
vendelieu committed Dec 14, 2024
1 parent ab1565b commit 05b85c2
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
32 changes: 32 additions & 0 deletions benchmarks/api/benchmarks.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
public class eu/vendeli/rethis/benchmarks/JedisBenchmark {
public fun <init> ()V
public fun jedisGet (Lorg/openjdk/jmh/infra/Blackhole;)V
public fun jedisSet (Lorg/openjdk/jmh/infra/Blackhole;)V
public fun setup ()V
public fun tearDown ()V
}

public class eu/vendeli/rethis/benchmarks/KredsBenchmark {
public fun <init> ()V
public fun kredsGet (Lorg/openjdk/jmh/infra/Blackhole;)V
public fun kredsSet (Lorg/openjdk/jmh/infra/Blackhole;)V
public fun setup ()V
public fun tearDown ()V
}

public class eu/vendeli/rethis/benchmarks/LettuceBenchmark {
public fun <init> ()V
public fun lettuceGet (Lorg/openjdk/jmh/infra/Blackhole;)V
public fun lettuceSet (Lorg/openjdk/jmh/infra/Blackhole;)V
public fun setup ()V
public fun tearDown ()V
}

public class eu/vendeli/rethis/benchmarks/RethisBenchmark {
public fun <init> ()V
public fun rethisGet (Lorg/openjdk/jmh/infra/Blackhole;)V
public fun rethisSet (Lorg/openjdk/jmh/infra/Blackhole;)V
public fun setup ()V
public fun tearDown ()V
}

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ internal suspend fun ByteReadChannel.readRedisMessage(charset: Charset, rawOnly:
val type = RespCode.fromCode(readByte()) // Read the type byte (e.g., +, -, :, $, *)
val line = readLine2Buffer()

if (rawOnly) return RType.Raw(line)
if (rawOnly) return RType.Raw(readLine2Buffer())

return when (type) {
RespCode.SIMPLE_STRING -> PlainString(line.readText(charset)) // Return SimpleString type
Expand Down

0 comments on commit 05b85c2

Please sign in to comment.