Skip to content

Commit

Permalink
Merge pull request #14 from maxmind/greg/prepare-for-1.0.1
Browse files Browse the repository at this point in the history
Prepare for 1.0.1
  • Loading branch information
eilara committed May 19, 2015
2 parents b3bf678 + c23ca42 commit e399176
Show file tree
Hide file tree
Showing 20 changed files with 487 additions and 390 deletions.
1 change: 1 addition & 0 deletions .nuget/NuGet.Config
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>

<configuration>
<solution>
<add key="disableSourceControlIntegration" value="true" />
Expand Down
4 changes: 2 additions & 2 deletions MaxMind.Db.Benchmark/MaxMind.Db.Benchmark.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.6.0.5\lib\net40\Newtonsoft.Json.dll</HintPath>
<HintPath>..\packages\Newtonsoft.Json.6.0.8\lib\net40\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
Expand Down
18 changes: 11 additions & 7 deletions MaxMind.Db.Benchmark/Program.cs
Original file line number Diff line number Diff line change
@@ -1,29 +1,33 @@
using System;
#region

using System;
using System.Net;

#endregion

namespace MaxMind.Db.Benchmark
{
class Program
internal class Program
{
static void Main(string[] args)
private static void Main(string[] args)
{
using (var reader = new Reader("GeoLite2-City.mmdb", FileAccessMode.MemoryMapped))
{
var count = 100000;
var rand = new Random();
var start = DateTime.Now;
for (int i = 0; i < count; i++)
for (var i = 0; i < count; i++)
{
var ip = new IPAddress(rand.Next(int.MaxValue));
if (i % 50000 == 0)
if (i%50000 == 0)
Console.WriteLine(i + " " + ip);

var resp = reader.Find(ip);
}

var stop = DateTime.Now;
Console.WriteLine("Requests per second: " + count / (stop - start).TotalSeconds);
Console.WriteLine("Requests per second: " + count/(stop - start).TotalSeconds);
}
}
}
}
}
13 changes: 10 additions & 3 deletions MaxMind.Db.Benchmark/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
using System.Reflection;
using System.Runtime.CompilerServices;
#region

using System.Reflection;
using System.Runtime.InteropServices;

#endregion

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.

[assembly: AssemblyTitle("Test")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
Expand All @@ -17,9 +21,11 @@
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.

[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM

[assembly: Guid("44f6ab62-9326-4383-9954-1357a8160621")]

// Version information for an assembly consists of the following four values:
Expand All @@ -32,5 +38,6 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
2 changes: 1 addition & 1 deletion MaxMind.Db.Benchmark/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="6.0.5" targetFramework="net40" />
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net4" userInstalled="true" />
</packages>
Loading

0 comments on commit e399176

Please sign in to comment.