Skip to content

Instantly share code, notes, and snippets.

View antonfirsov's full-sized avatar

Anton Firszov antonfirsov

View GitHub Profile
An unhanded exception occured.
At this point you can opt to continue, however it is possible that the aborted computation will cause additional failures. Because PerfView generally only opens files for reading, there is no danger of corrupting files, so it generally does not hurt to try. However be on guard for unusual/incorrect behavior going forward.
You can of course exit and restart PerfView to be completely safe.
The fact that this exception went unhanded is a programmer error. It should be reported so it can be fixed. Please set along the following stack trace information which will be useful in diagnosing the problem.
StackTrace:
System.ArgumentException: Invalid samples, two samples can not happen at the same time.
using System;
using System.Diagnostics.Tracing;
namespace EtwTest
{
[EventSource]
public class TestEventSource : EventSource
{
public static readonly TestEventSource Log = new TestEventSource();

LoadResizeSave

  • Jpg/b(...)e.jpg [21] --> small Jpeg444
  • Jpg/b(...)f.jpg [28] --> mid size Jpeg420 (jpeg420exif.jpg)
  • Jpg/i(...)e.jpg [43] --> large progressive jpeg

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18362 Intel Core i7-7700HQ CPU 2.80GHz (Kaby Lake), 1 CPU, 8 logical and 4 physical cores .NET Core SDK=3.1.101 [Host] : .NET Core 3.1.1 (CoreCLR 4.700.19.60701, CoreFX 4.700.19.60801), X64 RyuJIT Job-NJQGIY : .NET Core 3.1.1 (CoreCLR 4.700.19.60701, CoreFX 4.700.19.60801), X64 RyuJIT

@antonfirsov
antonfirsov / install-liburing.sh
Last active January 26, 2022 00:49
Patch Ubuntu 18.04 LTS for io_uring
mkdir liburing
pushd liburing
git clone https://github.com/axboe/liburing.git
pushd liburing
./configure
make
sudo make install
popd
@antonfirsov
antonfirsov / ImageSharp-LoadResizeSavePerfprofile-2020-Feb.png
Last active February 27, 2020 01:33
ImageSharp-LoadResizeSavePerfprofile-2020-Feb
ImageSharp-LoadResizeSavePerfprofile-2020-Feb.png
@antonfirsov
antonfirsov / DnQ.cs
Last active February 19, 2020 00:58
Dithering and Quantization API proposal
public interface IFrameQuantizer<TPixel>
{
QuantizerOptions Options { get; }
// Make FirstPass explicit on the interface.
// For single-step PaletteQuantizer this is NOP
void BuildPalette(ImageFrame<TPixel> image, Rectangle bounds);
ReadOnlyMemory<TPixel> Palette { get; }
@antonfirsov
antonfirsov / PinHeap_ForwardAsMemory.cs
Last active February 4, 2020 13:08
Pin heap span & Forward as memory
unsafe class TemporaryHeapMemoryReference_MemoryManager : MemoryManager<byte>
{
private readonly unsafe byte* _ptr;
private readonly int _length;
public TemporaryHeapMemoryReference_MemoryManager(byte* ptr, int length)
{
_ptr = ptr;
_length = length;
}
@antonfirsov
antonfirsov / DupHandleInheritance.cpp
Last active January 24, 2020 18:44
WSADuplicateSocket vs Handle inheritance
void PrintInheritable(SOCKET s, const char* name) {
DWORD info;
if (GetHandleInformation((HANDLE)s, &info))
{
bool inheritable = (info & HANDLE_FLAG_INHERIT) == HANDLE_FLAG_INHERIT;
std::cout << name << " inheritable: " << inheritable << std::endl;
}
}
int main()
@antonfirsov
antonfirsov / RewriteCommits.cs
Created January 19, 2020 23:07
Rewrite SixLabors.Core History
private const string RepoPath = @"[...]\Core\.git\";
private static string FixCommitMessage(string m)
{
return "[SL.Core] " + m.Replace("#", "SixLabors/Core#");
}
static void Main(string[] args)
{
using var repo = new Repository(RepoPath);
@antonfirsov
antonfirsov / RRR.cs
Created December 18, 2019 19:09
_rightEndpoint Race Repro
using System;
using System.Net;
using System.Net.Sockets;
using System.Threading;
namespace UdpMultipleTest
{
static class Program
{
static void Main(string[] args)