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
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
using System; | |
using System.Runtime.InteropServices; | |
namespace GenerateIdBenchmark | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
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
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
using System.Collections.Concurrent; | |
var summary = BenchmarkRunner.Run(typeof(Program).Assembly); | |
class Helper | |
{ | |
public static string Repeat(string str, int count) | |
{ |
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
using System.Collections.Concurrent; | |
using System.Security.Cryptography; | |
using System.Security.Cryptography.X509Certificates; | |
ConcurrentDictionary<string, X509Certificate2> _certificates = new ConcurrentDictionary<string, X509Certificate2>(); | |
var rootCertPath = "root.pem"; | |
var rootKeyPath = "key.pem"; | |
var rootCert = X509Certificate2.CreateFromPemFile(rootCertPath, rootKeyPath); // initialize the root certificate |