Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 3d24935

Browse files
committed
Add new DebugSleep() cmd
1 parent 1320715 commit 3d24935

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/ServiceStack.Redis/Commands.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public static class Commands
4040
public readonly static byte[] Rewrite = "REWRITE".ToUtf8Bytes();
4141
public readonly static byte[] Time = "TIME".ToUtf8Bytes();
4242
public readonly static byte[] Segfault = "SEGFAULT".ToUtf8Bytes();
43+
public readonly static byte[] Sleep = "SLEEP".ToUtf8Bytes();
4344
public readonly static byte[] Dump = "DUMP".ToUtf8Bytes();
4445
public readonly static byte[] Restore = "RESTORE".ToUtf8Bytes();
4546
public readonly static byte[] Migrate = "MIGRATE".ToUtf8Bytes();

src/ServiceStack.Redis/RedisNativeClient.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -317,10 +317,15 @@ public byte[][] Time()
317317
return SendExpectMultiData(Commands.Time);
318318
}
319319

320-
public void DebugSegfault()
321-
{
322-
SendExpectSuccess(Commands.Debug, Commands.Segfault);
323-
}
320+
public void DebugSegfault()
321+
{
322+
SendExpectSuccess(Commands.Debug, Commands.Segfault);
323+
}
324+
325+
public void DebugSleep(double durationSecs)
326+
{
327+
SendExpectSuccess(Commands.Debug, Commands.Sleep, durationSecs.ToUtf8Bytes());
328+
}
324329

325330
public byte[] Dump(string key)
326331
{

0 commit comments

Comments
 (0)