-
Notifications
You must be signed in to change notification settings - Fork 550
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'list-commands' of https://github.com/hishamco/garnet in…
…to pr/382
- Loading branch information
Showing
118 changed files
with
4,622 additions
and
2,549 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
|
||
using BenchmarkDotNet.Attributes; | ||
|
||
using Garnet.server; | ||
|
||
namespace BDN.benchmark | ||
{ | ||
[MemoryDiagnoser] | ||
public class GeoHashBenchmarks | ||
{ | ||
private const double Latitude = 47.642219912251285; | ||
private const double Longitude = -122.14205560231471; | ||
|
||
private const long GeoHashInteger = 1557413161902764; | ||
|
||
[Benchmark] | ||
public long GeoToLongValue() => GeoHash.GeoToLongValue(Latitude, Longitude); | ||
|
||
[Benchmark] | ||
public (double, double) GetCoordinatesFromLong() => GeoHash.GetCoordinatesFromLong(GeoHashInteger); | ||
|
||
[Benchmark] | ||
public string GetGeoHashCode() => GeoHash.GetGeoHashCode(GeoHashInteger); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,33 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
|
||
using BenchmarkDotNet.Columns; | ||
using BenchmarkDotNet.Configs; | ||
using BenchmarkDotNet.Environments; | ||
using BenchmarkDotNet.Exporters; | ||
using BenchmarkDotNet.Jobs; | ||
using BenchmarkDotNet.Loggers; | ||
using BenchmarkDotNet.Running; | ||
|
||
var config = DefaultConfig.Instance | ||
.AddJob(Job.Default | ||
.WithRuntime(CoreRuntime.Core60) | ||
.WithId(".NET 6")) | ||
.AddJob(Job.Default | ||
.WithRuntime(CoreRuntime.Core80) | ||
.WithEnvironmentVariables(new EnvironmentVariable("DOTNET_TieredPGO", "0")) | ||
.WithId(".NET 8")); | ||
BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args, new BaseConfig()); | ||
|
||
BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args, config); | ||
public class BaseConfig : ManualConfig | ||
{ | ||
public Job Net6BaseJob { get; } | ||
public Job Net8BaseJob { get; } | ||
|
||
public BaseConfig() | ||
{ | ||
AddLogger(ConsoleLogger.Default); | ||
AddExporter(DefaultExporters.Markdown); | ||
AddColumnProvider(DefaultColumnProviders.Instance); | ||
|
||
var baseJob = Job.Default.WithGcServer(true); | ||
|
||
Net6BaseJob = baseJob.WithRuntime(CoreRuntime.Core60); | ||
Net8BaseJob = baseJob.WithRuntime(CoreRuntime.Core80) | ||
.WithEnvironmentVariables(new EnvironmentVariable("DOTNET_TieredPGO", "0")); | ||
|
||
AddJob(Net6BaseJob.WithId(".NET 6"), Net8BaseJob.WithId(".NET 8")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.