mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-07-10 02:57:21 +00:00
36 lines
1.1 KiB
C#
36 lines
1.1 KiB
C#
using System;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using BenchmarkDotNet.Running;
|
|
using SharpCompress.Archives;
|
|
using SharpCompress.Performance;
|
|
using SharpCompress.Readers;
|
|
using SharpCompress.Test;
|
|
|
|
|
|
var index = AppDomain.CurrentDomain.BaseDirectory.IndexOf(
|
|
"SharpCompress.Performance",
|
|
StringComparison.OrdinalIgnoreCase
|
|
);
|
|
var path = AppDomain.CurrentDomain.BaseDirectory.Substring(0, index);
|
|
var SOLUTION_BASE_PATH = Path.GetDirectoryName(path) ?? throw new ArgumentNullException();
|
|
|
|
var TEST_ARCHIVES_PATH = Path.Combine(SOLUTION_BASE_PATH, "TestArchives", "Archives");
|
|
|
|
//using var _ = JetbrainsProfiler.Memory($"C:\\Users\\adh\\git\\temp");
|
|
using (var __ = JetbrainsProfiler.Cpu($"C:\\Users\\adh\\git\\temp"))
|
|
{
|
|
string filename = @"C:\Users\adh\Downloads\7Zip Samples-20260119T114757Z-3-001\7Zip Samples\original.7z";
|
|
for (int i = 0; i < 10; i++)
|
|
{
|
|
await Extractor.GetFiles(filename);
|
|
Console.WriteLine(i);
|
|
}
|
|
|
|
Console.WriteLine("Still running...");
|
|
}
|
|
await Task.Delay(500);
|
|
|
|
//BenchmarkRunner.Run<Benchmarks>();
|