Skip to content

Commit a2d61dd

Browse files
committed
Performance and scale benchmarking sample
1 parent 44adbac commit a2d61dd

File tree

8 files changed

+577
-0
lines changed

8 files changed

+577
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
bin/
2+
obj/
3+
packages/
4+
ElasticCollectionsDemo.v12.suo
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1"/>
5+
</startup>
6+
<runtime>
7+
<gcServer enabled="true"/>
8+
</runtime>
9+
<appSettings>
10+
<add key="EndPointUrl" value="https://FILLIN.documents.azure.com:443/"/>
11+
<add key="AuthorizationKey" value="FILLIN"/>
12+
13+
<add key="DatabaseName" value="db"/>
14+
<add key="CollectionName" value="testdata"/>
15+
<add key="MetricCollectionName" value="metrics"/>
16+
17+
<add key="CollectionThroughput" value="50000"/>
18+
<add key="ShouldDeleteAndRecreateDatabaseAndCollection" value="false"/>
19+
<add key="DegreeOfParallelism" value="500"/>
20+
<add key="NumberOfDocumentsToInsert" value="100000"/>
21+
22+
<add key="CollectionPartitionKey" value="/partitionKey"/>
23+
<add key="DocumentTemplateFile" value="Player.json"/>
24+
</appSettings>
25+
<system.diagnostics>
26+
<trace autoflush="false" indentsize="4">
27+
<listeners>
28+
<add name="configConsoleListener" type="System.Diagnostics.ConsoleTraceListener" />
29+
</listeners>
30+
</trace>
31+
</system.diagnostics>
32+
</configuration>
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{0AEFFA67-EC42-4BEB-998B-7F0B9379436D}</ProjectGuid>
8+
<OutputType>Exe</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>DocumentDBBenchmark</RootNamespace>
11+
<AssemblyName>DocumentDBBenchmark</AssemblyName>
12+
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<NuGetPackageImportStamp>b4fb0ea4</NuGetPackageImportStamp>
15+
<TargetFrameworkProfile />
16+
</PropertyGroup>
17+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
18+
<PlatformTarget>x64</PlatformTarget>
19+
<DebugSymbols>true</DebugSymbols>
20+
<DebugType>full</DebugType>
21+
<Optimize>false</Optimize>
22+
<OutputPath>bin\Debug\</OutputPath>
23+
<DefineConstants>DEBUG;TRACE</DefineConstants>
24+
<ErrorReport>prompt</ErrorReport>
25+
<WarningLevel>4</WarningLevel>
26+
</PropertyGroup>
27+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
28+
<PlatformTarget>AnyCPU</PlatformTarget>
29+
<DebugType>pdbonly</DebugType>
30+
<Optimize>true</Optimize>
31+
<OutputPath>bin\Release\</OutputPath>
32+
<DefineConstants>TRACE</DefineConstants>
33+
<ErrorReport>prompt</ErrorReport>
34+
<WarningLevel>4</WarningLevel>
35+
</PropertyGroup>
36+
<ItemGroup>
37+
<Reference Include="Microsoft.Azure.Documents.Client, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
38+
<HintPath>packages\Microsoft.Azure.DocumentDB.1.7.1\lib\net45\Microsoft.Azure.Documents.Client.dll</HintPath>
39+
<Private>True</Private>
40+
</Reference>
41+
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
42+
<HintPath>packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
43+
<Private>True</Private>
44+
</Reference>
45+
<Reference Include="System" />
46+
<Reference Include="System.configuration" />
47+
<Reference Include="System.Core" />
48+
<Reference Include="System.IO.Compression" />
49+
<Reference Include="System.Net.Http" />
50+
<Reference Include="System.Xml.Linq" />
51+
<Reference Include="System.Data.DataSetExtensions" />
52+
<Reference Include="Microsoft.CSharp" />
53+
<Reference Include="System.Data" />
54+
<Reference Include="System.Xml" />
55+
</ItemGroup>
56+
<ItemGroup>
57+
<Compile Include="Program.cs" />
58+
</ItemGroup>
59+
<ItemGroup>
60+
<None Include="App.config">
61+
<SubType>Designer</SubType>
62+
</None>
63+
<None Include="KeyValue.json">
64+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
65+
</None>
66+
<None Include="packages.config" />
67+
<None Include="Player.json">
68+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
69+
</None>
70+
</ItemGroup>
71+
<ItemGroup>
72+
<Folder Include="Properties\" />
73+
</ItemGroup>
74+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
75+
<Import Project="packages\Microsoft.Azure.DocumentDB.1.7.1\build\Microsoft.Azure.DocumentDB.targets" Condition="Exists('packages\Microsoft.Azure.DocumentDB.1.7.1\build\Microsoft.Azure.DocumentDB.targets')" />
76+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
77+
<PropertyGroup>
78+
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
79+
</PropertyGroup>
80+
<Error Condition="!Exists('packages\Microsoft.Azure.DocumentDB.1.7.1\build\Microsoft.Azure.DocumentDB.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Azure.DocumentDB.1.7.1\build\Microsoft.Azure.DocumentDB.targets'))" />
81+
</Target>
82+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
83+
Other similar extension points exist, see Microsoft.Common.targets.
84+
<Target Name="BeforeBuild">
85+
</Target>
86+
<Target Name="AfterBuild">
87+
</Target>
88+
-->
89+
</Project>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 2013
4+
VisualStudioVersion = 12.0.40629.0
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DocumentDBBenchmark", "DocumentDBBenchmark.csproj", "{0AEFFA67-EC42-4BEB-998B-7F0B9379436D}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{0AEFFA67-EC42-4BEB-998B-7F0B9379436D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{0AEFFA67-EC42-4BEB-998B-7F0B9379436D}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{0AEFFA67-EC42-4BEB-998B-7F0B9379436D}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{0AEFFA67-EC42-4BEB-998B-7F0B9379436D}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
EndGlobal
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"id":"G02-D06-a067ff",
3+
"playerId":"a067ff"
4+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"id": "G02-D06-a067ff",
3+
"playerId": "a067ff",
4+
"hashedId": "bb0091",
5+
"countryCode": "hk",
6+
"nickname": "DannyBoy",
7+
"nicknameLower": "dannyboy",
8+
"score": 0,
9+
"secondaryScore": 18,
10+
"indexScore": 0.18,
11+
"level": 1,
12+
"lastSaveUnixTime": 1446591499,
13+
"lastLoadUnixTime": 1446590552,
14+
"disconnectedUnixTime": 1446591499,
15+
"facebookId": "FB_1010006092353214",
16+
"gameCenterId": "GC_G:1939511430",
17+
"chatMessages": [
18+
{
19+
"playerId": "67879d8e",
20+
"name": "lee",
21+
"message": "hi",
22+
"time": 760455049,
23+
"notificationType": "None"
24+
}
25+
]
26+
}

0 commit comments

Comments
 (0)