Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
StackExchange.Redis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
StackExchange.Redis
Commits
4b50c4f5
Commit
4b50c4f5
authored
Jul 10, 2018
by
Nick Craver
Committed by
Nick Craver
Jul 10, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tests: fix Profiling.Simple
parent
d27870d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
Profiling.cs
StackExchange.Redis.Tests/Profiling.cs
+7
-6
No files found.
StackExchange.Redis.Tests/Profiling.cs
View file @
4b50c4f5
...
@@ -29,7 +29,8 @@ public void Simple()
...
@@ -29,7 +29,8 @@ public void Simple()
conn
.
RegisterProfiler
(
profiler
);
conn
.
RegisterProfiler
(
profiler
);
conn
.
BeginProfiling
(
profiler
.
MyContext
);
conn
.
BeginProfiling
(
profiler
.
MyContext
);
var
db
=
conn
.
GetDatabase
();
var
dbId
=
TestConfig
.
GetDedicatedDB
();
var
db
=
conn
.
GetDatabase
(
dbId
);
db
.
StringSet
(
key
,
"world"
);
db
.
StringSet
(
key
,
"world"
);
var
val
=
db
.
StringGet
(
key
);
var
val
=
db
.
StringGet
(
key
);
Assert
.
Equal
(
"world"
,
(
string
)
val
);
Assert
.
Equal
(
"world"
,
(
string
)
val
);
...
@@ -49,17 +50,17 @@ public void Simple()
...
@@ -49,17 +50,17 @@ public void Simple()
Assert
.
True
(
set
.
CommandCreated
<=
get
.
CommandCreated
);
Assert
.
True
(
set
.
CommandCreated
<=
get
.
CommandCreated
);
Assert
.
True
(
get
.
CommandCreated
<=
eval
.
CommandCreated
);
Assert
.
True
(
get
.
CommandCreated
<=
eval
.
CommandCreated
);
AssertProfiledCommandValues
(
set
,
conn
);
AssertProfiledCommandValues
(
set
,
conn
,
dbId
);
AssertProfiledCommandValues
(
get
,
conn
);
AssertProfiledCommandValues
(
get
,
conn
,
dbId
);
AssertProfiledCommandValues
(
eval
,
conn
);
AssertProfiledCommandValues
(
eval
,
conn
,
dbId
);
}
}
}
}
private
static
void
AssertProfiledCommandValues
(
IProfiledCommand
command
,
ConnectionMultiplexer
conn
)
private
static
void
AssertProfiledCommandValues
(
IProfiledCommand
command
,
ConnectionMultiplexer
conn
,
int
dbId
)
{
{
Assert
.
Equal
(
4
,
command
.
Db
);
Assert
.
Equal
(
dbId
,
command
.
Db
);
Assert
.
Equal
(
conn
.
GetEndPoints
()[
0
],
command
.
EndPoint
);
Assert
.
Equal
(
conn
.
GetEndPoints
()[
0
],
command
.
EndPoint
);
Assert
.
True
(
command
.
CreationToEnqueued
>
TimeSpan
.
Zero
);
Assert
.
True
(
command
.
CreationToEnqueued
>
TimeSpan
.
Zero
);
Assert
.
True
(
command
.
EnqueuedToSending
>
TimeSpan
.
Zero
);
Assert
.
True
(
command
.
EnqueuedToSending
>
TimeSpan
.
Zero
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment