mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 19:26:39 +02:00
Add find file plugin.
This commit is contained in:
32
Wox.Test/MFTSearcherTest.cs
Normal file
32
Wox.Test/MFTSearcherTest.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using NUnit.Framework;
|
||||
using Wox.Infrastructure.MFTSearch;
|
||||
|
||||
namespace Wox.Test
|
||||
{
|
||||
[TestFixture]
|
||||
public class MFTSearcherTest
|
||||
{
|
||||
[Test]
|
||||
public void MatchTest()
|
||||
{
|
||||
var searchtimestart = DateTime.Now;
|
||||
MFTSearcher.IndexAllVolumes();
|
||||
var searchtimeend = DateTime.Now;
|
||||
Console.WriteLine(string.Format("{0} file indexed, {1}ms has spent.", MFTSearcher.IndexedFileCount, searchtimeend.Subtract(searchtimestart).TotalMilliseconds));
|
||||
|
||||
searchtimestart = DateTime.Now;
|
||||
List<MFTSearchRecord> mftSearchRecords = MFTSearcher.Search("q");
|
||||
searchtimeend = DateTime.Now;
|
||||
Console.WriteLine(string.Format("{0} file searched, {1}ms has spent.", mftSearchRecords.Count, searchtimeend.Subtract(searchtimestart).TotalMilliseconds));
|
||||
|
||||
searchtimestart = DateTime.Now;
|
||||
mftSearchRecords = MFTSearcher.Search("ss");
|
||||
searchtimeend = DateTime.Now;
|
||||
Console.WriteLine(string.Format("{0} file searched, {1}ms has spent.", mftSearchRecords.Count, searchtimeend.Subtract(searchtimestart).TotalMilliseconds));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -44,6 +44,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="FuzzyMatcherTest.cs" />
|
||||
<Compile Include="MFTSearcherTest.cs" />
|
||||
<Compile Include="QueryTest.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user