Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
Dapper
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
Dapper
Commits
b8dedd0e
Commit
b8dedd0e
authored
May 24, 2012
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a test to compare performance to DataTable (via IDataReader.GetValues)
parent
77dde933
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
1 deletion
+30
-1
PerformanceTests.cs
Tests/PerformanceTests.cs
+30
-1
No files found.
Tests/PerformanceTests.cs
View file @
b8dedd0e
...
@@ -235,8 +235,37 @@ public void Run(int iterations)
...
@@ -235,8 +235,37 @@ public void Run(int iterations)
}
}
},
"hand coded"
);
},
"hand coded"
);
tests
.
Run
(
iterations
);
DataTable
table
=
new
DataTable
{
Columns
=
{
{
"Id"
,
typeof
(
int
)},
{
"Text"
,
typeof
(
string
)},
{
"CreationDate"
,
typeof
(
DateTime
)},
{
"LastChangeDate"
,
typeof
(
DateTime
)},
{
"Counter1"
,
typeof
(
int
)},
{
"Counter2"
,
typeof
(
int
)},
{
"Counter3"
,
typeof
(
int
)},
{
"Counter4"
,
typeof
(
int
)},
{
"Counter5"
,
typeof
(
int
)},
{
"Counter6"
,
typeof
(
int
)},
{
"Counter7"
,
typeof
(
int
)},
{
"Counter8"
,
typeof
(
int
)},
{
"Counter9"
,
typeof
(
int
)},
}
};
tests
.
Add
(
id
=>
{
idParam
.
Value
=
id
;
object
[]
values
=
new
object
[
13
];
using
(
var
reader
=
postCommand
.
ExecuteReader
())
{
reader
.
Read
();
reader
.
GetValues
(
values
);
table
.
Rows
.
Add
(
values
);
}
},
"DataTable via IDataReader.GetValues"
);
tests
.
Run
(
iterations
);
}
}
}
}
...
...
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