This file contains hidden or 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 System.Runtime.InteropServices; | |
using BenchmarkDotNet.Order; | |
namespace AutoIndexCache.Benchmarks; | |
[MemoryDiagnoser] | |
[Orderer(SummaryOrderPolicy.FastestToSlowest)] | |
[GcServer] | |
public class Benchmarks |
This file contains hidden or 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
/// <summary> | |
/// Provides extension methods for the <see cref="Action" /> type. | |
/// </summary> | |
public static class ActionExtensions | |
{ | |
/// <summary> | |
/// Creates a debounced version of the given function <paramref name="action" />. | |
/// Use this method when you want a function to be executed after a certain amount of time has passed since it was called the last time. | |
/// </summary> | |
/// <param name="action">The function to debounce.</param> |