Skip to content

Instantly share code, notes, and snippets.

@szehetner
szehetner / ThreadSuspension.cs
Created November 15, 2023 11:10
Thread Suspension Repro
using System.Diagnostics;
using System.Runtime.CompilerServices;
namespace ThreadSuspension
{
internal class Program
{
private static readonly CancellationTokenSource _cts = new CancellationTokenSource();
private static IIdleStrategy _idleStrategy = new NoOpIdleStrategy();
using System.Text;
using Baseline;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Diagnosers;
using Org.SbeTool.Sbe.Dll;
namespace Org.SbeTool.Sbe.Benchmarks.Bench.Benchmarks
{
[HardwareCounters(HardwareCounter.BranchMispredictions, HardwareCounter.BranchInstructions)]
[MemoryDiagnoser]
using System;
using System.Text.RegularExpressions;
using BenchmarkDotNet.Attributes;
namespace TestApp
{
[MemoryDiagnoser]
public class TextNormalizerBenchmark
{
private string _valueLowerCase = "headername";
using System;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.InteropServices;
using BenchmarkDotNet.Attributes;
namespace TestApp
{
[MemoryDiagnoser]
public class DecimalConverter
@szehetner
szehetner / PerfTestProgram.cs
Created April 13, 2018 21:12
ProtoWriter.DemandSpace Benchmark
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
using ProtoBuf;
using ProtoBuf.Meta;