-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Processing dotnet/runtime#102144 (comment) command:
Command
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
using System;
using System.Net;
public class Bench
{
[Benchmark]
[Arguments("192.168.0.1")]
[Arguments("4294967295")]
[Arguments("037777777777")]
[Arguments("0xff.0x7f.0x20.0x01")]
[Arguments("192.168.0.0/16")]
[Arguments("::192.168.0.1")]
[Arguments("100:0:1:2:0:0:000:abcd")]
[Arguments("Fe08::1%13542")]
[Arguments("1:2:3:4:5:6:7:8::")]
public bool TryParse(string s) => IPAddress.TryParse(s, out _);
[Benchmark]
[Arguments("http://192.168.0.1:123/foo")]
[Arguments("http://[100:0:1:2:0:0:000:abcd]:123/foo")]
public string UriHost(string s) => new Uri(s).Host;
}(EgorBot will reply in this issue)
Metadata
Metadata
Assignees
Labels
No labels