Skip to content

Commit 9721868

Browse files
committed
Add fsbench and its benchmark
1 parent bc0a5ad commit 9721868

13 files changed

Lines changed: 1279 additions & 0 deletions

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
![Unpreallocated File Write Times](benchmarks/unprealloctimes.avif) \
1313
![File I/O Speeds](benchmarks/filespeeds.avif) \
1414
As you can see, the unpreallocated file write times make the original memfs unusable, especially for web downloads. But if you need maximum sequential speed and are able to preallocate the file with NtCreateFile and its AllocationSize, then you should use the original memfs.
15+
![Fsbench](benchmarks/fsbench.avif)
1516

1617
## CLI
1718
```

WinFsp-MemFs-Extended.sln

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinFsp-MemFs-Extended", "Wi
77
EndProject
88
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RandomFilesTester", "RandomFilesTester\RandomFilesTester.vcxproj", "{1CCD3B61-DDA5-4093-B1E4-E0742D9EC186}"
99
EndProject
10+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Winfsp-Fsbench", "Winfsp-Fsbench\Winfsp-Fsbench.vcxproj", "{07264DB3-819A-49AD-A242-7107922AC612}"
11+
EndProject
1012
Global
1113
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1214
Debug|x64 = Debug|x64
@@ -31,6 +33,14 @@ Global
3133
{1CCD3B61-DDA5-4093-B1E4-E0742D9EC186}.Release|x64.Build.0 = Release|x64
3234
{1CCD3B61-DDA5-4093-B1E4-E0742D9EC186}.Release|x86.ActiveCfg = Release|Win32
3335
{1CCD3B61-DDA5-4093-B1E4-E0742D9EC186}.Release|x86.Build.0 = Release|Win32
36+
{07264DB3-819A-49AD-A242-7107922AC612}.Debug|x64.ActiveCfg = Debug|x64
37+
{07264DB3-819A-49AD-A242-7107922AC612}.Debug|x64.Build.0 = Debug|x64
38+
{07264DB3-819A-49AD-A242-7107922AC612}.Debug|x86.ActiveCfg = Debug|Win32
39+
{07264DB3-819A-49AD-A242-7107922AC612}.Debug|x86.Build.0 = Debug|Win32
40+
{07264DB3-819A-49AD-A242-7107922AC612}.Release|x64.ActiveCfg = Release|x64
41+
{07264DB3-819A-49AD-A242-7107922AC612}.Release|x64.Build.0 = Release|x64
42+
{07264DB3-819A-49AD-A242-7107922AC612}.Release|x86.ActiveCfg = Release|Win32
43+
{07264DB3-819A-49AD-A242-7107922AC612}.Release|x86.Build.0 = Release|Win32
3444
EndGlobalSection
3545
GlobalSection(SolutionProperties) = preSolution
3646
HideSolutionNode = FALSE
Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|Win32">
5+
<Configuration>Debug</Configuration>
6+
<Platform>Win32</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Release|Win32">
9+
<Configuration>Release</Configuration>
10+
<Platform>Win32</Platform>
11+
</ProjectConfiguration>
12+
<ProjectConfiguration Include="Debug|x64">
13+
<Configuration>Debug</Configuration>
14+
<Platform>x64</Platform>
15+
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Release|x64">
17+
<Configuration>Release</Configuration>
18+
<Platform>x64</Platform>
19+
</ProjectConfiguration>
20+
</ItemGroup>
21+
<PropertyGroup Label="Globals">
22+
<VCProjectVersion>16.0</VCProjectVersion>
23+
<Keyword>Win32Proj</Keyword>
24+
<ProjectGuid>{07264db3-819a-49ad-a242-7107922ac612}</ProjectGuid>
25+
<RootNamespace>WinfspFsbench</RootNamespace>
26+
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
27+
</PropertyGroup>
28+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
29+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
30+
<ConfigurationType>Application</ConfigurationType>
31+
<UseDebugLibraries>true</UseDebugLibraries>
32+
<PlatformToolset>v143</PlatformToolset>
33+
<CharacterSet>Unicode</CharacterSet>
34+
</PropertyGroup>
35+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
36+
<ConfigurationType>Application</ConfigurationType>
37+
<UseDebugLibraries>false</UseDebugLibraries>
38+
<PlatformToolset>v143</PlatformToolset>
39+
<WholeProgramOptimization>true</WholeProgramOptimization>
40+
<CharacterSet>Unicode</CharacterSet>
41+
</PropertyGroup>
42+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
43+
<ConfigurationType>Application</ConfigurationType>
44+
<UseDebugLibraries>true</UseDebugLibraries>
45+
<PlatformToolset>v143</PlatformToolset>
46+
<CharacterSet>Unicode</CharacterSet>
47+
</PropertyGroup>
48+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
49+
<ConfigurationType>Application</ConfigurationType>
50+
<UseDebugLibraries>false</UseDebugLibraries>
51+
<PlatformToolset>v143</PlatformToolset>
52+
<WholeProgramOptimization>true</WholeProgramOptimization>
53+
<CharacterSet>Unicode</CharacterSet>
54+
</PropertyGroup>
55+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
56+
<ImportGroup Label="ExtensionSettings">
57+
</ImportGroup>
58+
<ImportGroup Label="Shared">
59+
</ImportGroup>
60+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
61+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
62+
</ImportGroup>
63+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
64+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
65+
</ImportGroup>
66+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
67+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
68+
</ImportGroup>
69+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
70+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
71+
</ImportGroup>
72+
<PropertyGroup Label="UserMacros" />
73+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
74+
<LinkIncremental>true</LinkIncremental>
75+
<TargetName>fsbench</TargetName>
76+
</PropertyGroup>
77+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
78+
<LinkIncremental>false</LinkIncremental>
79+
<TargetName>fsbench</TargetName>
80+
</PropertyGroup>
81+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
82+
<LinkIncremental>true</LinkIncremental>
83+
<TargetName>fsbench</TargetName>
84+
</PropertyGroup>
85+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
86+
<LinkIncremental>false</LinkIncremental>
87+
<TargetName>fsbench</TargetName>
88+
</PropertyGroup>
89+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
90+
<ClCompile>
91+
<WarningLevel>Level3</WarningLevel>
92+
<SDLCheck>true</SDLCheck>
93+
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
94+
<ConformanceMode>false</ConformanceMode>
95+
<BufferSecurityCheck>false</BufferSecurityCheck>
96+
</ClCompile>
97+
<Link>
98+
<SubSystem>Console</SubSystem>
99+
<GenerateDebugInformation>true</GenerateDebugInformation>
100+
<AdditionalDependencies>ntdll.lib;%(AdditionalDependencies)</AdditionalDependencies>
101+
</Link>
102+
</ItemDefinitionGroup>
103+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
104+
<ClCompile>
105+
<WarningLevel>Level3</WarningLevel>
106+
<FunctionLevelLinking>true</FunctionLevelLinking>
107+
<IntrinsicFunctions>true</IntrinsicFunctions>
108+
<SDLCheck>true</SDLCheck>
109+
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
110+
<ConformanceMode>false</ConformanceMode>
111+
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
112+
<BufferSecurityCheck>false</BufferSecurityCheck>
113+
</ClCompile>
114+
<Link>
115+
<SubSystem>Console</SubSystem>
116+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
117+
<OptimizeReferences>true</OptimizeReferences>
118+
<GenerateDebugInformation>true</GenerateDebugInformation>
119+
<AdditionalDependencies>ntdll.lib;%(AdditionalDependencies)</AdditionalDependencies>
120+
</Link>
121+
</ItemDefinitionGroup>
122+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
123+
<ClCompile>
124+
<WarningLevel>Level3</WarningLevel>
125+
<SDLCheck>true</SDLCheck>
126+
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
127+
<ConformanceMode>false</ConformanceMode>
128+
<BufferSecurityCheck>false</BufferSecurityCheck>
129+
</ClCompile>
130+
<Link>
131+
<SubSystem>Console</SubSystem>
132+
<GenerateDebugInformation>true</GenerateDebugInformation>
133+
<AdditionalDependencies>ntdll.lib;%(AdditionalDependencies)</AdditionalDependencies>
134+
</Link>
135+
</ItemDefinitionGroup>
136+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
137+
<ClCompile>
138+
<WarningLevel>Level3</WarningLevel>
139+
<FunctionLevelLinking>true</FunctionLevelLinking>
140+
<IntrinsicFunctions>true</IntrinsicFunctions>
141+
<SDLCheck>true</SDLCheck>
142+
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
143+
<ConformanceMode>false</ConformanceMode>
144+
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
145+
<BufferSecurityCheck>false</BufferSecurityCheck>
146+
</ClCompile>
147+
<Link>
148+
<SubSystem>Console</SubSystem>
149+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
150+
<OptimizeReferences>true</OptimizeReferences>
151+
<GenerateDebugInformation>true</GenerateDebugInformation>
152+
<AdditionalDependencies>ntdll.lib;%(AdditionalDependencies)</AdditionalDependencies>
153+
</Link>
154+
</ItemDefinitionGroup>
155+
<ItemGroup>
156+
<ClCompile Include="fsbench.c" />
157+
<ClCompile Include="tlib\callstack.c" />
158+
<ClCompile Include="tlib\injection.c" />
159+
<ClCompile Include="tlib\testsuite.c" />
160+
</ItemGroup>
161+
<ItemGroup>
162+
<ClInclude Include="tlib\callstack.h" />
163+
<ClInclude Include="tlib\injection.h" />
164+
<ClInclude Include="tlib\testsuite.h" />
165+
</ItemGroup>
166+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
167+
<ImportGroup Label="ExtensionTargets">
168+
</ImportGroup>
169+
</Project>
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<Filter Include="Quelldateien">
5+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6+
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7+
</Filter>
8+
<Filter Include="Headerdateien">
9+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10+
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
11+
</Filter>
12+
<Filter Include="Ressourcendateien">
13+
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14+
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15+
</Filter>
16+
<Filter Include="tlib">
17+
<UniqueIdentifier>{9e660577-deb0-49f6-ae36-6c33335122ff}</UniqueIdentifier>
18+
</Filter>
19+
</ItemGroup>
20+
<ItemGroup>
21+
<ClCompile Include="fsbench.c">
22+
<Filter>Quelldateien</Filter>
23+
</ClCompile>
24+
<ClCompile Include="tlib\callstack.c">
25+
<Filter>tlib</Filter>
26+
</ClCompile>
27+
<ClCompile Include="tlib\injection.c">
28+
<Filter>tlib</Filter>
29+
</ClCompile>
30+
<ClCompile Include="tlib\testsuite.c">
31+
<Filter>tlib</Filter>
32+
</ClCompile>
33+
</ItemGroup>
34+
<ItemGroup>
35+
<ClInclude Include="tlib\callstack.h">
36+
<Filter>tlib</Filter>
37+
</ClInclude>
38+
<ClInclude Include="tlib\injection.h">
39+
<Filter>tlib</Filter>
40+
</ClInclude>
41+
<ClInclude Include="tlib\testsuite.h">
42+
<Filter>tlib</Filter>
43+
</ClInclude>
44+
</ItemGroup>
45+
</Project>

0 commit comments

Comments
 (0)