Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
75f4268e
Commit
75f4268e
authored
Mar 05, 2009
by
Jon Skeet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor benchmarking changes
parent
6678a73b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
Program.cs
src/ProtoBench/Program.cs
+3
-0
ProtoBench.csproj
src/ProtoBench/ProtoBench.csproj
+0
-2
No files found.
src/ProtoBench/Program.cs
View file @
75f4268e
...
@@ -67,6 +67,7 @@ namespace Google.ProtocolBuffers.ProtoBench
...
@@ -67,6 +67,7 @@ namespace Google.ProtocolBuffers.ProtoBench
.
WeakMergeFrom
(
CodedInputStream
.
CreateInstance
(
inputStream
))
.
WeakMergeFrom
(
CodedInputStream
.
CreateInstance
(
inputStream
))
.
WeakBuild
();
.
WeakBuild
();
});
});
Console
.
WriteLine
();
return
true
;
return
true
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
Console
.
Error
.
WriteLine
(
"Error: {0}"
,
e
.
Message
);
Console
.
Error
.
WriteLine
(
"Error: {0}"
,
e
.
Message
);
...
@@ -97,6 +98,8 @@ namespace Google.ProtocolBuffers.ProtoBench
...
@@ -97,6 +98,8 @@ namespace Google.ProtocolBuffers.ProtoBench
}
}
private
static
TimeSpan
TimeAction
(
Action
action
,
int
iterations
)
{
private
static
TimeSpan
TimeAction
(
Action
action
,
int
iterations
)
{
GC
.
Collect
();
GC
.
WaitForPendingFinalizers
();
Stopwatch
sw
=
Stopwatch
.
StartNew
();
Stopwatch
sw
=
Stopwatch
.
StartNew
();
for
(
int
i
=
0
;
i
<
iterations
;
i
++)
{
for
(
int
i
=
0
;
i
<
iterations
;
i
++)
{
action
();
action
();
...
...
src/ProtoBench/ProtoBench.csproj
View file @
75f4268e
...
@@ -38,8 +38,6 @@
...
@@ -38,8 +38,6 @@
<Reference
Include=
"System.Xml"
/>
<Reference
Include=
"System.Xml"
/>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Compile
Include=
"BenchmarkProtoFile.cs"
/>
<Compile
Include=
"BenchmarkSpeedProtoFile.cs"
/>
<Compile
Include=
"Program.cs"
/>
<Compile
Include=
"Program.cs"
/>
<Compile
Include=
"Properties\AssemblyInfo.cs"
/>
<Compile
Include=
"Properties\AssemblyInfo.cs"
/>
</ItemGroup>
</ItemGroup>
...
...
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