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
8e08d410
Commit
8e08d410
authored
Dec 01, 2010
by
ArnoldZokas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrated targets for generating benchmark source and assembly
parent
8c5121bc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
3 deletions
+51
-3
Common.targets
build/Common.targets
+50
-3
build.csproj
build/build.csproj
+1
-0
No files found.
build/Common.targets
View file @
8e08d410
...
@@ -32,7 +32,8 @@
...
@@ -32,7 +32,8 @@
<Target
Name=
"_Test"
DependsOnTargets=
"_CompileGeneratedSource"
>
<Target
Name=
"_Test"
DependsOnTargets=
"_CompileGeneratedSource"
>
<Exec
Command=
""$(NUnitExePath)" %(TestContainer.Identity) /xml:$(BuildTempDirectory)\..\%(TestContainer.Filename).$(BuildConfiguration).xml"
/>
<Exec
Command=
""$(NUnitExePath)" %(TestContainer.Identity) /xml:$(BuildTempDirectory)\..\%(TestContainer.Filename).$(BuildConfiguration).xml"
/>
</Target>
</Target>
<!--## Package Generation ##-->
<Target
Name=
"_PreparePackageComponent"
>
<Target
Name=
"_PreparePackageComponent"
>
<Copy
SourceFiles=
"@(DynamicPackageItem)"
DestinationFolder=
"$(BuildOutputDirectory)\%(DynamicPackageItem.TargetDirectory)\%(DynamicPackageItem.RecursiveDir)"
/>
<Copy
SourceFiles=
"@(DynamicPackageItem)"
DestinationFolder=
"$(BuildOutputDirectory)\%(DynamicPackageItem.TargetDirectory)\%(DynamicPackageItem.RecursiveDir)"
/>
</Target>
</Target>
...
@@ -51,8 +52,53 @@
...
@@ -51,8 +52,53 @@
<RemoveDir
Directories=
"@(DirectoriesToDelete)"
ContinueOnError=
"true"
/>
<RemoveDir
Directories=
"@(DirectoriesToDelete)"
ContinueOnError=
"true"
/>
</Target>
</Target>
<Target
Name=
"_RunBenchmarks"
>
<!--## Benchmark ##-->
<Exec
Command=
""$(ProtoBenchExePath)" Google.ProtocolBuffers.ProtoBench.SizeMessage1,BenchmarkTypes $(ProjectDirectory)\benchmarks\google_message1.dat > "$(BuildTempDirectory)\..\BenchmarkResults.txt""
/>
<Target
Name=
"_GenerateBenchmarkSource"
DependsOnTargets=
"_Clean"
>
<PropertyGroup>
<Args>
$(BenchmarkProtosDirectory)\google_size.proto $(BenchmarkProtosDirectory)\google_speed.proto
</Args>
</PropertyGroup>
<Exec
Command=
"$(ProtocExePath) --proto_path=$(BenchmarkProtosDirectory);$(ProtosDirectory) --include_imports=compiled.pb --descriptor_set_out=compiled.pb $(Args)"
WorkingDirectory=
"$(BuildTempDirectory)"
/>
<Exec
Command=
"$(ProtogenExePath) compiled.pb"
WorkingDirectory=
"$(BuildTempDirectory)"
/>
</Target>
<Target
Name=
"_CompileBenchmarkAssembly"
DependsOnTargets=
"_GenerateBenchmarkSource"
>
<ItemGroup>
<BenchmarkSources
Include=
"$(BuildTempDirectory)\GoogleSizeProtoFile.cs"
/>
<BenchmarkSources
Include=
"$(BuildTempDirectory)\GoogleSpeedProtoFile.cs"
/>
</ItemGroup>
<Csc
TargetType=
"library"
OutputAssembly=
"$(BuildTempDirectory)\BenchmarkTypes.dll"
Optimize=
"true"
Sources=
"@(BenchmarkSources)"
References=
"$(SourceDirectory)\ProtocolBuffers\bin\$(BuildConfiguration)\Google.ProtocolBuffers.dll"
/>
</Target>
<Target
Name=
"_PrepareBenchmarkEnvironment"
DependsOnTargets=
"_CompileBenchmarkAssembly"
>
<ItemGroup>
<BenchmarkResources
Include=
"$(BenchmarkProtosDirectory)\google_message1.dat"
/>
<BenchmarkResources
Include=
"$(BenchmarkProtosDirectory)\google_message2.dat"
/>
<BenchmarkResources
Include=
"$(SourceDirectory)\ProtoBench\bin\$(BuildConfiguration)\ProtoBench.exe"
/>
</ItemGroup>
<Copy
SourceFiles=
"@(BenchmarkResources)"
DestinationFolder=
"$(BuildTempDirectory)"
/>
</Target>
<Target
Name=
"_RunBenchmarks"
DependsOnTargets=
"_PrepareBenchmarkEnvironment"
>
<ItemGroup>
<BenchmarkParameter
Include=
"Google.ProtocolBuffers.ProtoBench.SizeMessage1,BenchmarkTypes"
/>
<BenchmarkParameter
Include=
"google_message1.dat"
/>
<BenchmarkParameter
Include=
"Google.ProtocolBuffers.ProtoBench.SpeedMessage1,BenchmarkTypes"
/>
<BenchmarkParameter
Include=
"google_message1.dat"
/>
<BenchmarkParameter
Include=
"Google.ProtocolBuffers.ProtoBench.SizeMessage2,BenchmarkTypes"
/>
<BenchmarkParameter
Include=
"google_message2.dat"
/>
<BenchmarkParameter
Include=
"Google.ProtocolBuffers.ProtoBench.SpeedMessage2,BenchmarkTypes"
/>
<BenchmarkParameter
Include=
"google_message2.dat"
/>
</ItemGroup>
<PropertyGroup>
<BenchmarkParameterList>
@(BenchmarkParameter)
</BenchmarkParameterList>
<Args>
$(BenchmarkParameterList.Replace(`;`,` `))
</Args>
</PropertyGroup>
<Exec
Command=
""$(ProtoBenchExePath)" $(Args) > "$(BuildTempDirectory)\..\BenchmarkResults.txt""
WorkingDirectory=
"$(BuildTempDirectory)"
/>
</Target>
</Target>
</Project>
</Project>
\ No newline at end of file
build/build.csproj
View file @
8e08d410
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
<SourceDirectory>
$(ProjectDirectory)\src
</SourceDirectory>
<SourceDirectory>
$(ProjectDirectory)\src
</SourceDirectory>
<LibDirectory>
$(ProjectDirectory)\lib
</LibDirectory>
<LibDirectory>
$(ProjectDirectory)\lib
</LibDirectory>
<ProtosDirectory>
$(ProjectDirectory)\protos
</ProtosDirectory>
<ProtosDirectory>
$(ProjectDirectory)\protos
</ProtosDirectory>
<BenchmarkProtosDirectory>
$(ProjectDirectory)\benchmarks
</BenchmarkProtosDirectory>
<BuildTempDirectory>
$(ProjectDirectory)\build_temp\$(BuildConfiguration)
</BuildTempDirectory>
<BuildTempDirectory>
$(ProjectDirectory)\build_temp\$(BuildConfiguration)
</BuildTempDirectory>
<BuildOutputDirectory>
$(ProjectDirectory)\build_output\$(BuildConfiguration)
</BuildOutputDirectory>
<BuildOutputDirectory>
$(ProjectDirectory)\build_output\$(BuildConfiguration)
</BuildOutputDirectory>
...
...
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