diff --git a/Benchmark.NetCore/Benchmark.NetCore.csproj b/Benchmark.NetCore/Benchmark.NetCore.csproj
index 880d2090..8e95627f 100644
--- a/Benchmark.NetCore/Benchmark.NetCore.csproj
+++ b/Benchmark.NetCore/Benchmark.NetCore.csproj
@@ -32,6 +32,7 @@
+
diff --git a/Benchmark.NetCore/GrpcExporterBenchmarks.cs b/Benchmark.NetCore/GrpcExporterBenchmarks.cs
new file mode 100644
index 00000000..dde8ecf1
--- /dev/null
+++ b/Benchmark.NetCore/GrpcExporterBenchmarks.cs
@@ -0,0 +1,62 @@
+using BenchmarkDotNet.Attributes;
+using Microsoft.AspNetCore.Http;
+using Prometheus;
+using System.Threading.Tasks;
+using Grpc.AspNetCore.Server;
+using Grpc.Core;
+
+namespace Benchmark.NetCore
+{
+ [MemoryDiagnoser]
+ public class GrpcExporterBenchmarks
+ {
+ private CollectorRegistry _registry;
+ private MetricFactory _factory;
+ private GrpcRequestCountMiddleware _countMiddleware;
+ private GrpcRequestDurationMiddleware _durationMiddleware;
+ private DefaultHttpContext _ctx;
+
+ [Params(1000, 10000)]
+ public int RequestCount { get; set; }
+
+ [GlobalSetup]
+ public void Setup()
+ {
+ _ctx = new DefaultHttpContext();
+ _ctx.SetEndpoint(new Endpoint(
+ ctx => Task.CompletedTask,
+ new EndpointMetadataCollection(new GrpcMethodMetadata(typeof(int),
+ new Method