Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: FileSystemEntry.Attributes property is not correct on Unix #52235

Merged
merged 17 commits into from
May 8, 2021

Conversation

carlossanlop
Copy link
Member

Fixes #37301

New attempt - this time without a perf regression. Changes in this PR:

  • Caching the stat and lstat results inside FileStatus.
  • Collection of information is the same between FileSystemEntry and FileStatus.
  • The Hidden and ReadOnly flags are now being collected when expected, and made sure they are collected lazily, to avoid the perf regression on enumeration when not required.
  • `System.IO.FileSystem unit tests passed locally, pending checking all results from CI.

cc @iSazonov @mklement0 @Jozkee @adamsitnik @jeffhandley

I collected perf results for the System.IO.Tests.Perf_Directory benchmarks four times, before and after my changes, because IO benchmarks tend to yield not-so-stable results. I wanted to make sure the results stayed under a close margin of error:

Command:

/home/carlos/.dotnet/dotnet run \
    --project /home/carlos/performance/src/benchmarks/micro/MicroBenchmarks.csproj
    -c Release -f net6.0 \
    --artifacts /home/carlos/perf_together \
    --coreRun \
        /home/carlos/runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun \
        /home/carlos/runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun \
    --cli /home/carlos/.dotnet/dotnet \
    --statisticalTest 3ms \
    --filter System.IO.Tests.Perf_Directory*
Result 1
Method Job Toolchain UnrollFactor depth Mean Error StdDev Median Min Max Ratio MannWhitney(3ms) RatioSD Gen 0 Gen 1 Gen 2 Allocated
CreateDirectory Job-VQFCFU /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 20,786.0 ns 909.50 ns 1,047.38 ns 20,665.0 ns 19,000.0 ns 23,180.0 ns 1.03 Same 0.07 - - - 497 B
CreateDirectory Job-YTPACX /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 20,123.0 ns 687.54 ns 791.77 ns 19,840.0 ns 19,020.0 ns 21,580.0 ns 1.00 Base 0.00 - - - 377 B
GetCurrentDirectory Job-ZALFUF /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 615.0 ns 6.28 ns 5.87 ns 615.5 ns 598.7 ns 623.2 ns 1.01 Same 0.03 0.0442 - - 288 B
GetCurrentDirectory Job-KVFFMU /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 606.8 ns 14.38 ns 16.56 ns 605.7 ns 557.5 ns 632.4 ns 1.00 Base 0.00 0.0440 - - 288 B
Exists Job-ZALFUF /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 622.9 ns 10.46 ns 9.78 ns 624.7 ns 608.5 ns 637.6 ns 1.02 Same 0.02 - - - -
Exists Job-KVFFMU /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 610.9 ns 4.02 ns 3.76 ns 611.2 ns 601.5 ns 616.3 ns 1.00 Base 0.00 - - - -
EnumerateFiles Job-ZALFUF /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,436,529.1 ns 32,055.46 ns 29,984.70 ns 3,447,346.9 ns 3,380,712.5 ns 3,471,143.8 ns 1.02 Same 0.01 125.0000 - - 872,324 B
EnumerateFiles Job-KVFFMU /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,361,367.6 ns 34,994.73 ns 31,021.91 ns 3,346,721.9 ns 3,328,408.8 ns 3,430,447.5 ns 1.00 Base 0.00 137.5000 - - 872,321 B
RecursiveCreateDeleteDirectory Job-ZALFUF /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 366,592.8 ns 4,279.96 ns 3,573.96 ns 366,223.7 ns 361,246.7 ns 372,439.2 ns 1.00 Same 0.02 1.4535 - - 9,553 B
RecursiveCreateDeleteDirectory Job-KVFFMU /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 366,512.9 ns 6,944.90 ns 6,156.47 ns 365,293.6 ns 357,992.4 ns 378,678.6 ns 1.00 Base 0.00 - - - 8,113 B
RecursiveCreateDeleteDirectory Job-ZALFUF /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,011,570.2 ns 30,733.07 ns 27,244.06 ns 4,013,036.3 ns 3,969,929.0 ns 4,059,991.9 ns 1.01 Same 0.01 32.2581 16.1290 - 249,588 B
RecursiveCreateDeleteDirectory Job-KVFFMU /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 3,957,395.1 ns 45,248.32 ns 37,784.40 ns 3,959,139.7 ns 3,891,123.8 ns 4,021,439.7 ns 1.00 Base 0.00 31.7460 15.8730 - 237,357 B
Result 2
Method Job Toolchain UnrollFactor depth Mean Error StdDev Median Min Max Ratio MannWhitney(3ms) RatioSD Gen 0 Gen 1 Gen 2 Allocated
CreateDirectory Job-NAOXHK /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 19,783.3 ns 791.01 ns 846.38 ns 19,410.0 ns 18,770.0 ns 21,480.0 ns 0.95 Same 0.11 - - - 497 B
CreateDirectory Job-SUNLMH /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 21,055.6 ns 2,350.29 ns 2,514.79 ns 20,135.0 ns 18,760.0 ns 26,970.0 ns 1.00 Base 0.00 - - - 377 B
GetCurrentDirectory Job-AIHZTX /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 603.1 ns 7.41 ns 6.93 ns 602.6 ns 586.8 ns 615.6 ns 1.00 Same 0.01 0.0457 - - 288 B
GetCurrentDirectory Job-HOTEOR /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 600.8 ns 2.30 ns 2.15 ns 600.4 ns 597.4 ns 604.4 ns 1.00 Base 0.00 0.0436 - - 288 B
Exists Job-AIHZTX /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 614.7 ns 5.18 ns 4.60 ns 614.4 ns 609.7 ns 623.1 ns 1.01 Same 0.01 - - - -
Exists Job-HOTEOR /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 611.0 ns 4.58 ns 4.06 ns 609.4 ns 604.1 ns 618.4 ns 1.00 Base 0.00 - - - -
EnumerateFiles Job-AIHZTX /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,441,360.7 ns 26,152.90 ns 23,183.86 ns 3,438,537.5 ns 3,398,874.2 ns 3,485,755.5 ns 1.03 Same 0.01 125.0000 - - 872,323 B
EnumerateFiles Job-HOTEOR /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,332,139.2 ns 25,884.69 ns 24,212.56 ns 3,331,166.2 ns 3,300,743.8 ns 3,363,672.5 ns 1.00 Base 0.00 137.5000 - - 872,322 B
RecursiveCreateDeleteDirectory Job-AIHZTX /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 367,497.6 ns 4,021.55 ns 3,565.00 ns 366,880.6 ns 361,300.4 ns 374,970.8 ns 1.01 Same 0.01 1.4620 - - 9,554 B
RecursiveCreateDeleteDirectory Job-HOTEOR /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 364,194.4 ns 4,306.78 ns 3,596.36 ns 364,351.7 ns 359,269.8 ns 369,916.0 ns 1.00 Base 0.00 - - - 8,113 B
RecursiveCreateDeleteDirectory Job-AIHZTX /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,007,709.4 ns 39,706.47 ns 33,156.70 ns 4,011,190.5 ns 3,937,668.3 ns 4,054,766.7 ns 1.00 Same 0.01 31.7460 15.8730 - 249,587 B
RecursiveCreateDeleteDirectory Job-HOTEOR /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,002,334.2 ns 34,737.30 ns 30,793.71 ns 3,997,458.9 ns 3,952,767.7 ns 4,060,111.3 ns 1.00 Base 0.00 32.2581 16.1290 - 237,357 B
Result 3
Method Job Toolchain UnrollFactor depth Mean Error StdDev Median Min Max Ratio MannWhitney(3ms) RatioSD Gen 0 Gen 1 Gen 2 Allocated
CreateDirectory Job-PDEYFB /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 20,425.8 ns 1,504.72 ns 1,672.50 ns 19,930.0 ns 18,730.0 ns 24,170.0 ns 0.99 Same 0.10 - - - 497 B
CreateDirectory Job-OWNBSX /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 20,690.5 ns 1,000.45 ns 1,112.00 ns 20,760.0 ns 18,990.0 ns 22,770.0 ns 1.00 Base 0.00 - - - 377 B
GetCurrentDirectory Job-MLRFUU /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 609.1 ns 8.71 ns 8.15 ns 610.9 ns 593.9 ns 623.5 ns 1.00 Same 0.02 0.0452 - - 288 B
GetCurrentDirectory Job-ZSPQVX /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 606.5 ns 7.70 ns 7.21 ns 606.4 ns 591.4 ns 616.1 ns 1.00 Base 0.00 0.0459 - - 288 B
Exists Job-MLRFUU /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 620.7 ns 1.91 ns 1.78 ns 620.0 ns 618.4 ns 624.1 ns 1.00 Same 0.01 - - - -
Exists Job-ZSPQVX /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 621.7 ns 4.35 ns 4.07 ns 623.0 ns 613.1 ns 625.9 ns 1.00 Base 0.00 - - - -
EnumerateFiles Job-MLRFUU /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,492,924.1 ns 31,351.68 ns 29,326.38 ns 3,489,420.3 ns 3,446,018.8 ns 3,538,670.3 ns 1.03 Same 0.01 125.0000 - - 872,324 B
EnumerateFiles Job-ZSPQVX /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,391,640.5 ns 33,177.29 ns 31,034.06 ns 3,391,781.2 ns 3,344,562.5 ns 3,461,081.2 ns 1.00 Base 0.00 137.5000 - - 872,321 B
RecursiveCreateDeleteDirectory Job-MLRFUU /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 419,711.6 ns 27,996.69 ns 32,241.03 ns 429,124.8 ns 361,567.1 ns 468,078.5 ns 1.18 Same 0.05 - - - 9,553 B
RecursiveCreateDeleteDirectory Job-ZSPQVX /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 366,426.2 ns 6,737.50 ns 5,260.20 ns 365,630.5 ns 360,113.6 ns 380,890.1 ns 1.00 Base 0.00 - - - 8,113 B
RecursiveCreateDeleteDirectory Job-MLRFUU /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,012,941.6 ns 50,257.57 ns 44,552.02 ns 4,006,118.5 ns 3,955,548.4 ns 4,093,054.8 ns 1.00 Same 0.01 32.2581 16.1290 - 249,588 B
RecursiveCreateDeleteDirectory Job-ZSPQVX /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,031,409.2 ns 39,659.96 ns 35,157.52 ns 4,019,719.4 ns 3,995,309.7 ns 4,119,485.5 ns 1.00 Base 0.00 32.2581 16.1290 - 237,348 B
Result 4
Method Job Toolchain UnrollFactor depth Mean Error StdDev Median Min Max Ratio MannWhitney(3ms) RatioSD Gen 0 Gen 1 Gen 2 Allocated
CreateDirectory Job-ODAKGD /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 21,361.1 ns 2,064.33 ns 2,294.49 ns 20,610.0 ns 19,150.0 ns 27,150.0 ns 1.04 Same 0.13 - - - 497 B
CreateDirectory Job-OVXERW /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 20,603.2 ns 1,332.69 ns 1,481.28 ns 20,030.0 ns 19,060.0 ns 24,150.0 ns 1.00 Base 0.00 - - - 377 B
GetCurrentDirectory Job-FNVICF /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 596.2 ns 8.61 ns 8.05 ns 597.1 ns 581.3 ns 607.6 ns 1.00 Same 0.02 0.0435 - - 288 B
GetCurrentDirectory Job-MXCTDU /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 597.5 ns 10.43 ns 9.25 ns 597.7 ns 584.1 ns 616.2 ns 1.00 Base 0.00 0.0452 - - 288 B
Exists Job-FNVICF /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 618.3 ns 5.64 ns 5.28 ns 617.5 ns 611.5 ns 630.4 ns 0.99 Same 0.01 - - - -
Exists Job-MXCTDU /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 623.7 ns 3.24 ns 3.04 ns 624.3 ns 619.3 ns 628.6 ns 1.00 Base 0.00 - - - -
EnumerateFiles Job-FNVICF /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,393,408.9 ns 32,024.75 ns 29,955.97 ns 3,396,978.8 ns 3,329,993.8 ns 3,436,910.0 ns 1.02 Same 0.01 137.5000 - - 872,322 B
EnumerateFiles Job-MXCTDU /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,337,261.2 ns 45,611.81 ns 42,665.32 ns 3,348,791.2 ns 3,274,133.8 ns 3,411,288.8 ns 1.00 Base 0.00 137.5000 - - 872,321 B
RecursiveCreateDeleteDirectory Job-FNVICF /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 364,870.1 ns 4,342.78 ns 3,626.42 ns 365,444.7 ns 356,443.9 ns 368,413.9 ns 1.00 Same 0.01 1.4599 - - 9,554 B
RecursiveCreateDeleteDirectory Job-MXCTDU /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 363,824.3 ns 3,982.08 ns 3,530.01 ns 364,590.2 ns 356,500.9 ns 370,426.6 ns 1.00 Base 0.00 - - - 8,113 B
RecursiveCreateDeleteDirectory Job-FNVICF /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,005,961.7 ns 43,158.49 ns 38,258.88 ns 4,002,134.2 ns 3,939,368.3 ns 4,092,201.7 ns 1.00 Same 0.01 33.3333 16.6667 - 249,588 B
RecursiveCreateDeleteDirectory Job-MXCTDU /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,016,106.9 ns 55,378.57 ns 43,235.95 ns 4,016,171.0 ns 3,941,038.7 ns 4,079,680.6 ns 1.00 Base 0.00 32.2581 16.1290 - 237,357 B

@carlossanlop carlossanlop added this to the 6.0.0 milestone May 4, 2021
@carlossanlop carlossanlop added this to In progress in System.IO - File links via automation May 4, 2021
@carlossanlop carlossanlop self-assigned this May 4, 2021
@ghost
Copy link

ghost commented May 4, 2021

Tagging subscribers to this area: @carlossanlop
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #37301

New attempt - this time without a perf regression. Changes in this PR:

  • Caching the stat and lstat results inside FileStatus.
  • Collection of information is the same between FileSystemEntry and FileStatus.
  • The Hidden and ReadOnly flags are now being collected when expected, and made sure they are collected lazily, to avoid the perf regression on enumeration when not required.
  • `System.IO.FileSystem unit tests passed locally, pending checking all results from CI.

cc @iSazonov @mklement0 @Jozkee @adamsitnik @jeffhandley

I collected perf results for the System.IO.Tests.Perf_Directory benchmarks four times, before and after my changes, because IO benchmarks tend to yield not-so-stable results. I wanted to make sure the results stayed under a close margin of error:

Command:

/home/carlos/.dotnet/dotnet run \
    --project /home/carlos/performance/src/benchmarks/micro/MicroBenchmarks.csproj
    -c Release -f net6.0 \
    --artifacts /home/carlos/perf_together \
    --coreRun \
        /home/carlos/runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun \
        /home/carlos/runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun \
    --cli /home/carlos/.dotnet/dotnet \
    --statisticalTest 3ms \
    --filter System.IO.Tests.Perf_Directory*
Result 1
Method Job Toolchain UnrollFactor depth Mean Error StdDev Median Min Max Ratio MannWhitney(3ms) RatioSD Gen 0 Gen 1 Gen 2 Allocated
CreateDirectory Job-VQFCFU /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 20,786.0 ns 909.50 ns 1,047.38 ns 20,665.0 ns 19,000.0 ns 23,180.0 ns 1.03 Same 0.07 - - - 497 B
CreateDirectory Job-YTPACX /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 20,123.0 ns 687.54 ns 791.77 ns 19,840.0 ns 19,020.0 ns 21,580.0 ns 1.00 Base 0.00 - - - 377 B
GetCurrentDirectory Job-ZALFUF /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 615.0 ns 6.28 ns 5.87 ns 615.5 ns 598.7 ns 623.2 ns 1.01 Same 0.03 0.0442 - - 288 B
GetCurrentDirectory Job-KVFFMU /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 606.8 ns 14.38 ns 16.56 ns 605.7 ns 557.5 ns 632.4 ns 1.00 Base 0.00 0.0440 - - 288 B
Exists Job-ZALFUF /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 622.9 ns 10.46 ns 9.78 ns 624.7 ns 608.5 ns 637.6 ns 1.02 Same 0.02 - - - -
Exists Job-KVFFMU /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 610.9 ns 4.02 ns 3.76 ns 611.2 ns 601.5 ns 616.3 ns 1.00 Base 0.00 - - - -
EnumerateFiles Job-ZALFUF /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,436,529.1 ns 32,055.46 ns 29,984.70 ns 3,447,346.9 ns 3,380,712.5 ns 3,471,143.8 ns 1.02 Same 0.01 125.0000 - - 872,324 B
EnumerateFiles Job-KVFFMU /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,361,367.6 ns 34,994.73 ns 31,021.91 ns 3,346,721.9 ns 3,328,408.8 ns 3,430,447.5 ns 1.00 Base 0.00 137.5000 - - 872,321 B
RecursiveCreateDeleteDirectory Job-ZALFUF /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 366,592.8 ns 4,279.96 ns 3,573.96 ns 366,223.7 ns 361,246.7 ns 372,439.2 ns 1.00 Same 0.02 1.4535 - - 9,553 B
RecursiveCreateDeleteDirectory Job-KVFFMU /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 366,512.9 ns 6,944.90 ns 6,156.47 ns 365,293.6 ns 357,992.4 ns 378,678.6 ns 1.00 Base 0.00 - - - 8,113 B
RecursiveCreateDeleteDirectory Job-ZALFUF /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,011,570.2 ns 30,733.07 ns 27,244.06 ns 4,013,036.3 ns 3,969,929.0 ns 4,059,991.9 ns 1.01 Same 0.01 32.2581 16.1290 - 249,588 B
RecursiveCreateDeleteDirectory Job-KVFFMU /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 3,957,395.1 ns 45,248.32 ns 37,784.40 ns 3,959,139.7 ns 3,891,123.8 ns 4,021,439.7 ns 1.00 Base 0.00 31.7460 15.8730 - 237,357 B
Result 2
Method Job Toolchain UnrollFactor depth Mean Error StdDev Median Min Max Ratio MannWhitney(3ms) RatioSD Gen 0 Gen 1 Gen 2 Allocated
CreateDirectory Job-NAOXHK /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 19,783.3 ns 791.01 ns 846.38 ns 19,410.0 ns 18,770.0 ns 21,480.0 ns 0.95 Same 0.11 - - - 497 B
CreateDirectory Job-SUNLMH /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 21,055.6 ns 2,350.29 ns 2,514.79 ns 20,135.0 ns 18,760.0 ns 26,970.0 ns 1.00 Base 0.00 - - - 377 B
GetCurrentDirectory Job-AIHZTX /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 603.1 ns 7.41 ns 6.93 ns 602.6 ns 586.8 ns 615.6 ns 1.00 Same 0.01 0.0457 - - 288 B
GetCurrentDirectory Job-HOTEOR /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 600.8 ns 2.30 ns 2.15 ns 600.4 ns 597.4 ns 604.4 ns 1.00 Base 0.00 0.0436 - - 288 B
Exists Job-AIHZTX /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 614.7 ns 5.18 ns 4.60 ns 614.4 ns 609.7 ns 623.1 ns 1.01 Same 0.01 - - - -
Exists Job-HOTEOR /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 611.0 ns 4.58 ns 4.06 ns 609.4 ns 604.1 ns 618.4 ns 1.00 Base 0.00 - - - -
EnumerateFiles Job-AIHZTX /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,441,360.7 ns 26,152.90 ns 23,183.86 ns 3,438,537.5 ns 3,398,874.2 ns 3,485,755.5 ns 1.03 Same 0.01 125.0000 - - 872,323 B
EnumerateFiles Job-HOTEOR /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,332,139.2 ns 25,884.69 ns 24,212.56 ns 3,331,166.2 ns 3,300,743.8 ns 3,363,672.5 ns 1.00 Base 0.00 137.5000 - - 872,322 B
RecursiveCreateDeleteDirectory Job-AIHZTX /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 367,497.6 ns 4,021.55 ns 3,565.00 ns 366,880.6 ns 361,300.4 ns 374,970.8 ns 1.01 Same 0.01 1.4620 - - 9,554 B
RecursiveCreateDeleteDirectory Job-HOTEOR /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 364,194.4 ns 4,306.78 ns 3,596.36 ns 364,351.7 ns 359,269.8 ns 369,916.0 ns 1.00 Base 0.00 - - - 8,113 B
RecursiveCreateDeleteDirectory Job-AIHZTX /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,007,709.4 ns 39,706.47 ns 33,156.70 ns 4,011,190.5 ns 3,937,668.3 ns 4,054,766.7 ns 1.00 Same 0.01 31.7460 15.8730 - 249,587 B
RecursiveCreateDeleteDirectory Job-HOTEOR /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,002,334.2 ns 34,737.30 ns 30,793.71 ns 3,997,458.9 ns 3,952,767.7 ns 4,060,111.3 ns 1.00 Base 0.00 32.2581 16.1290 - 237,357 B
Result 3
Method Job Toolchain UnrollFactor depth Mean Error StdDev Median Min Max Ratio MannWhitney(3ms) RatioSD Gen 0 Gen 1 Gen 2 Allocated
CreateDirectory Job-PDEYFB /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 20,425.8 ns 1,504.72 ns 1,672.50 ns 19,930.0 ns 18,730.0 ns 24,170.0 ns 0.99 Same 0.10 - - - 497 B
CreateDirectory Job-OWNBSX /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 20,690.5 ns 1,000.45 ns 1,112.00 ns 20,760.0 ns 18,990.0 ns 22,770.0 ns 1.00 Base 0.00 - - - 377 B
GetCurrentDirectory Job-MLRFUU /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 609.1 ns 8.71 ns 8.15 ns 610.9 ns 593.9 ns 623.5 ns 1.00 Same 0.02 0.0452 - - 288 B
GetCurrentDirectory Job-ZSPQVX /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 606.5 ns 7.70 ns 7.21 ns 606.4 ns 591.4 ns 616.1 ns 1.00 Base 0.00 0.0459 - - 288 B
Exists Job-MLRFUU /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 620.7 ns 1.91 ns 1.78 ns 620.0 ns 618.4 ns 624.1 ns 1.00 Same 0.01 - - - -
Exists Job-ZSPQVX /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 621.7 ns 4.35 ns 4.07 ns 623.0 ns 613.1 ns 625.9 ns 1.00 Base 0.00 - - - -
EnumerateFiles Job-MLRFUU /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,492,924.1 ns 31,351.68 ns 29,326.38 ns 3,489,420.3 ns 3,446,018.8 ns 3,538,670.3 ns 1.03 Same 0.01 125.0000 - - 872,324 B
EnumerateFiles Job-ZSPQVX /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,391,640.5 ns 33,177.29 ns 31,034.06 ns 3,391,781.2 ns 3,344,562.5 ns 3,461,081.2 ns 1.00 Base 0.00 137.5000 - - 872,321 B
RecursiveCreateDeleteDirectory Job-MLRFUU /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 419,711.6 ns 27,996.69 ns 32,241.03 ns 429,124.8 ns 361,567.1 ns 468,078.5 ns 1.18 Same 0.05 - - - 9,553 B
RecursiveCreateDeleteDirectory Job-ZSPQVX /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 366,426.2 ns 6,737.50 ns 5,260.20 ns 365,630.5 ns 360,113.6 ns 380,890.1 ns 1.00 Base 0.00 - - - 8,113 B
RecursiveCreateDeleteDirectory Job-MLRFUU /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,012,941.6 ns 50,257.57 ns 44,552.02 ns 4,006,118.5 ns 3,955,548.4 ns 4,093,054.8 ns 1.00 Same 0.01 32.2581 16.1290 - 249,588 B
RecursiveCreateDeleteDirectory Job-ZSPQVX /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,031,409.2 ns 39,659.96 ns 35,157.52 ns 4,019,719.4 ns 3,995,309.7 ns 4,119,485.5 ns 1.00 Base 0.00 32.2581 16.1290 - 237,348 B
Result 4
Method Job Toolchain UnrollFactor depth Mean Error StdDev Median Min Max Ratio MannWhitney(3ms) RatioSD Gen 0 Gen 1 Gen 2 Allocated
CreateDirectory Job-ODAKGD /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 21,361.1 ns 2,064.33 ns 2,294.49 ns 20,610.0 ns 19,150.0 ns 27,150.0 ns 1.04 Same 0.13 - - - 497 B
CreateDirectory Job-OVXERW /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 20,603.2 ns 1,332.69 ns 1,481.28 ns 20,030.0 ns 19,060.0 ns 24,150.0 ns 1.00 Base 0.00 - - - 377 B
GetCurrentDirectory Job-FNVICF /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 596.2 ns 8.61 ns 8.05 ns 597.1 ns 581.3 ns 607.6 ns 1.00 Same 0.02 0.0435 - - 288 B
GetCurrentDirectory Job-MXCTDU /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 597.5 ns 10.43 ns 9.25 ns 597.7 ns 584.1 ns 616.2 ns 1.00 Base 0.00 0.0452 - - 288 B
Exists Job-FNVICF /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 618.3 ns 5.64 ns 5.28 ns 617.5 ns 611.5 ns 630.4 ns 0.99 Same 0.01 - - - -
Exists Job-MXCTDU /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 623.7 ns 3.24 ns 3.04 ns 624.3 ns 619.3 ns 628.6 ns 1.00 Base 0.00 - - - -
EnumerateFiles Job-FNVICF /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,393,408.9 ns 32,024.75 ns 29,955.97 ns 3,396,978.8 ns 3,329,993.8 ns 3,436,910.0 ns 1.02 Same 0.01 137.5000 - - 872,322 B
EnumerateFiles Job-MXCTDU /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,337,261.2 ns 45,611.81 ns 42,665.32 ns 3,348,791.2 ns 3,274,133.8 ns 3,411,288.8 ns 1.00 Base 0.00 137.5000 - - 872,321 B
RecursiveCreateDeleteDirectory Job-FNVICF /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 364,870.1 ns 4,342.78 ns 3,626.42 ns 365,444.7 ns 356,443.9 ns 368,413.9 ns 1.00 Same 0.01 1.4599 - - 9,554 B
RecursiveCreateDeleteDirectory Job-MXCTDU /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 363,824.3 ns 3,982.08 ns 3,530.01 ns 364,590.2 ns 356,500.9 ns 370,426.6 ns 1.00 Base 0.00 - - - 8,113 B
RecursiveCreateDeleteDirectory Job-FNVICF /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,005,961.7 ns 43,158.49 ns 38,258.88 ns 4,002,134.2 ns 3,939,368.3 ns 4,092,201.7 ns 1.00 Same 0.01 33.3333 16.6667 - 249,588 B
RecursiveCreateDeleteDirectory Job-MXCTDU /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,016,106.9 ns 55,378.57 ns 43,235.95 ns 4,016,171.0 ns 3,941,038.7 ns 4,079,680.6 ns 1.00 Base 0.00 32.2581 16.1290 - 237,357 B
Author: carlossanlop
Assignees: carlossanlop
Labels:

area-System.IO

Milestone: 6.0.0

…tatus.GetAttributes from FileSYstemEntry.Attributes since the disk hit is necessary anyway.
@carlossanlop
Copy link
Member Author

Updated perf results for commit 8c23640 . Ran them 4 times again since IO results tend to be somewhat volatile:

Result 1
Method Job Toolchain UnrollFactor depth Mean Error StdDev Median Min Max Ratio MannWhitney(3ms) RatioSD Gen 0 Gen 1 Gen 2 Allocated
CreateDirectory Job-KLVWOM /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 20,118.9 ns 961.31 ns 1,068.49 ns 19,730.0 ns 18,940.0 ns 22,920.0 ns 1.02 Same 0.05 - - - 497 B
CreateDirectory Job-EPNNZC /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 19,608.2 ns 548.88 ns 563.66 ns 19,550.0 ns 18,830.0 ns 20,670.0 ns 1.00 Base 0.00 - - - 377 B
GetCurrentDirectory Job-JXFPGD /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 588.7 ns 6.92 ns 6.13 ns 588.5 ns 579.6 ns 599.9 ns 0.99 Same 0.01 0.0448 - - 288 B
GetCurrentDirectory Job-TJZQVV /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 596.1 ns 6.76 ns 6.32 ns 594.0 ns 588.4 ns 607.4 ns 1.00 Base 0.00 0.0454 - - 288 B
Exists Job-JXFPGD /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 621.2 ns 3.30 ns 3.08 ns 620.9 ns 615.6 ns 628.2 ns 1.01 Same 0.00 - - - -
Exists Job-TJZQVV /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 618.0 ns 1.59 ns 1.41 ns 618.2 ns 615.4 ns 620.0 ns 1.00 Base 0.00 - - - -
EnumerateFiles Job-JXFPGD /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,407,003.2 ns 43,186.92 ns 38,284.08 ns 3,407,499.2 ns 3,350,123.4 ns 3,473,809.4 ns 1.01 Same 0.01 125.0000 - - 872,324 B
EnumerateFiles Job-TJZQVV /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,359,020.1 ns 29,605.76 ns 26,244.74 ns 3,358,570.6 ns 3,310,930.0 ns 3,396,732.5 ns 1.00 Base 0.00 137.5000 - - 872,322 B
RecursiveCreateDeleteDirectory Job-JXFPGD /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 376,146.6 ns 6,610.95 ns 5,520.44 ns 374,412.5 ns 371,302.5 ns 388,699.4 ns 1.02 Same 0.02 1.4535 - - 9,553 B
RecursiveCreateDeleteDirectory Job-TJZQVV /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 367,161.2 ns 3,842.77 ns 3,406.52 ns 368,448.4 ns 360,590.3 ns 370,804.0 ns 1.00 Base 0.00 - - - 8,113 B
RecursiveCreateDeleteDirectory Job-JXFPGD /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 3,988,412.0 ns 31,731.87 ns 28,129.48 ns 3,985,887.3 ns 3,942,207.9 ns 4,053,917.5 ns 0.99 Same 0.02 31.7460 15.8730 - 249,597 B
RecursiveCreateDeleteDirectory Job-TJZQVV /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,029,709.0 ns 85,142.63 ns 94,635.80 ns 3,993,288.9 ns 3,921,644.4 ns 4,250,427.0 ns 1.00 Base 0.00 31.7460 15.8730 - 237,363 B
Result 2
Method Job Toolchain UnrollFactor depth Mean Error StdDev Median Min Max Ratio MannWhitney(3ms) RatioSD Gen 0 Gen 1 Gen 2 Allocated
CreateDirectory Job-BHAAHE /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 21,314.0 ns 1,604.12 ns 1,847.31 ns 20,415.0 ns 19,170.0 ns 25,160.0 ns 1.01 Same 0.13 - - - 497 B
CreateDirectory Job-OCBZNF /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 21,147.4 ns 1,354.61 ns 1,505.64 ns 20,780.0 ns 19,250.0 ns 25,090.0 ns 1.00 Base 0.00 - - - 377 B
GetCurrentDirectory Job-EINRQE /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 594.0 ns 6.87 ns 6.42 ns 593.4 ns 582.5 ns 603.6 ns 0.99 Same 0.02 0.0458 - - 288 B
GetCurrentDirectory Job-ZDPMOI /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 597.4 ns 8.28 ns 7.75 ns 598.6 ns 582.7 ns 610.6 ns 1.00 Base 0.00 0.0449 - - 288 B
Exists Job-EINRQE /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 617.2 ns 1.16 ns 1.03 ns 617.2 ns 615.6 ns 619.3 ns 1.00 Same 0.00 - - - -
Exists Job-ZDPMOI /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 617.2 ns 2.79 ns 2.47 ns 617.1 ns 612.2 ns 622.3 ns 1.00 Base 0.00 - - - -
EnumerateFiles Job-EINRQE /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,416,316.6 ns 28,523.19 ns 25,285.06 ns 3,412,961.9 ns 3,366,488.8 ns 3,466,455.0 ns 1.02 Same 0.01 137.5000 - - 872,321 B
EnumerateFiles Job-ZDPMOI /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,349,468.1 ns 38,082.60 ns 35,622.49 ns 3,336,828.8 ns 3,309,318.8 ns 3,420,285.0 ns 1.00 Base 0.00 137.5000 - - 872,322 B
RecursiveCreateDeleteDirectory Job-EINRQE /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 375,628.3 ns 4,144.94 ns 3,461.21 ns 375,875.2 ns 370,431.4 ns 381,486.1 ns 1.04 Same 0.01 1.5244 - - 9,553 B
RecursiveCreateDeleteDirectory Job-ZDPMOI /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 362,718.0 ns 2,442.61 ns 2,165.31 ns 362,212.9 ns 360,070.2 ns 367,061.5 ns 1.00 Base 0.00 - - - 8,113 B
RecursiveCreateDeleteDirectory Job-EINRQE /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 3,994,834.7 ns 25,084.25 ns 22,236.54 ns 4,000,928.2 ns 3,962,641.9 ns 4,031,296.8 ns 0.99 Same 0.01 32.2581 16.1290 - 249,588 B
RecursiveCreateDeleteDirectory Job-ZDPMOI /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,017,969.6 ns 38,105.45 ns 29,750.23 ns 4,023,290.3 ns 3,962,119.4 ns 4,064,317.7 ns 1.00 Base 0.00 32.2581 16.1290 - 237,348 B
Result 3
Method Job Toolchain UnrollFactor depth Mean Error StdDev Median Min Max Ratio MannWhitney(3ms) RatioSD Gen 0 Gen 1 Gen 2 Allocated
CreateDirectory Job-XJFKXL /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 24,934.0 ns 2,448.65 ns 2,819.87 ns 24,845.0 ns 19,700.0 ns 29,640.0 ns 1.18 Same 0.16 - - - 497 B
CreateDirectory Job-TLRLOW /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 21,288.9 ns 1,595.72 ns 1,773.64 ns 22,030.0 ns 19,190.0 ns 24,360.0 ns 1.00 Base 0.00 - - - 377 B
GetCurrentDirectory Job-HIUTWP /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 608.6 ns 16.78 ns 19.33 ns 601.3 ns 588.6 ns 650.8 ns 1.03 Same 0.03 0.0451 - - 288 B
GetCurrentDirectory Job-LSOWZC /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 595.6 ns 7.89 ns 7.38 ns 594.8 ns 582.8 ns 607.0 ns 1.00 Base 0.00 0.0440 - - 288 B
Exists Job-HIUTWP /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 616.3 ns 3.24 ns 3.03 ns 615.9 ns 610.9 ns 620.9 ns 1.00 Same 0.01 - - - -
Exists Job-LSOWZC /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 618.3 ns 2.08 ns 1.85 ns 617.9 ns 615.7 ns 621.1 ns 1.00 Base 0.00 - - - -
EnumerateFiles Job-HIUTWP /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,392,687.6 ns 27,176.79 ns 25,421.19 ns 3,397,117.5 ns 3,341,993.8 ns 3,420,568.8 ns 1.02 Same 0.01 137.5000 - - 872,322 B
EnumerateFiles Job-LSOWZC /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,333,395.3 ns 18,976.86 ns 14,815.88 ns 3,338,178.8 ns 3,295,822.5 ns 3,349,588.8 ns 1.00 Base 0.00 137.5000 - - 872,321 B
RecursiveCreateDeleteDirectory Job-HIUTWP /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 374,385.2 ns 7,088.30 ns 6,630.40 ns 375,767.3 ns 362,969.6 ns 385,848.8 ns 1.02 Same 0.02 1.4881 - - 9,553 B
RecursiveCreateDeleteDirectory Job-LSOWZC /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 366,739.1 ns 3,751.80 ns 3,325.87 ns 367,350.3 ns 360,142.3 ns 371,045.5 ns 1.00 Base 0.00 - - - 8,113 B
RecursiveCreateDeleteDirectory Job-HIUTWP /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,006,857.1 ns 43,037.73 ns 35,938.45 ns 4,006,961.3 ns 3,941,262.9 ns 4,054,119.4 ns 1.00 Same 0.01 32.2581 16.1290 - 249,588 B
RecursiveCreateDeleteDirectory Job-LSOWZC /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,009,366.8 ns 34,591.84 ns 30,664.77 ns 4,007,508.9 ns 3,968,669.4 ns 4,051,300.0 ns 1.00 Base 0.00 32.2581 16.1290 - 237,348 B
Result 4
Method Job Toolchain UnrollFactor depth Mean Error StdDev Median Min Max Ratio MannWhitney(3ms) RatioSD Gen 0 Gen 1 Gen 2 Allocated
CreateDirectory Job-TIWVND /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 21,542.6 ns 1,998.82 ns 2,221.69 ns 21,110.0 ns 18,490.0 ns 25,990.0 ns 1.05 Same 0.15 - - - 497 B
CreateDirectory Job-PLXRAS /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 20,576.0 ns 1,281.68 ns 1,475.99 ns 19,755.0 ns 19,000.0 ns 24,080.0 ns 1.00 Base 0.00 - - - 377 B
GetCurrentDirectory Job-IBYOIQ /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 586.2 ns 6.02 ns 5.63 ns 588.2 ns 576.5 ns 596.5 ns 0.99 Same 0.01 0.0443 - - 288 B
GetCurrentDirectory Job-REDLKB /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 593.0 ns 4.98 ns 4.42 ns 594.4 ns 583.8 ns 598.8 ns 1.00 Base 0.00 0.0455 - - 288 B
Exists Job-IBYOIQ /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 614.5 ns 2.31 ns 2.16 ns 615.0 ns 610.5 ns 617.4 ns 1.00 Same 0.00 - - - -
Exists Job-REDLKB /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 616.8 ns 2.87 ns 2.55 ns 616.7 ns 612.7 ns 620.6 ns 1.00 Base 0.00 - - - -
EnumerateFiles Job-IBYOIQ /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,426,692.7 ns 29,286.75 ns 25,961.94 ns 3,423,271.9 ns 3,380,446.2 ns 3,472,807.5 ns 1.03 Same 0.01 137.5000 - - 872,321 B
EnumerateFiles Job-REDLKB /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,342,421.2 ns 29,094.69 ns 27,215.19 ns 3,339,922.5 ns 3,300,196.2 ns 3,404,238.8 ns 1.00 Base 0.00 137.5000 - - 872,321 B
RecursiveCreateDeleteDirectory Job-IBYOIQ /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 381,788.8 ns 4,161.45 ns 3,475.00 ns 382,852.5 ns 375,710.1 ns 386,669.0 ns 1.05 Same 0.02 1.4881 - - 9,553 B
RecursiveCreateDeleteDirectory Job-REDLKB /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 365,387.8 ns 4,974.94 ns 4,154.30 ns 365,315.1 ns 359,014.1 ns 374,928.3 ns 1.00 Base 0.00 - - - 8,113 B
RecursiveCreateDeleteDirectory Job-IBYOIQ /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,007,891.4 ns 22,188.17 ns 17,323.07 ns 4,008,345.8 ns 3,971,325.0 ns 4,033,416.7 ns 0.99 Same 0.01 33.3333 16.6667 - 249,598 B
RecursiveCreateDeleteDirectory Job-REDLKB /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,057,374.0 ns 31,182.41 ns 27,642.39 ns 4,053,872.0 ns 4,007,922.0 ns 4,107,245.8 ns 1.00 Base 0.00 33.8983 16.9492 - 237,348 B

@carlossanlop carlossanlop marked this pull request as ready for review May 4, 2021 05:56
public long Length => _status.GetLength(FullPath, continueOnError: true);
public DateTimeOffset CreationTimeUtc => _status.GetCreationTime(FullPath, continueOnError: true);
public DateTimeOffset LastAccessTimeUtc => _status.GetLastAccessTime(FullPath, continueOnError: true);
public DateTimeOffset LastWriteTimeUtc => _status.GetLastWriteTime(FullPath, continueOnError: true);
public bool IsDirectory => _status.InitiallyDirectory;
public bool IsHidden => _directoryEntry.Name[0] == '.';
public bool IsHidden => _directoryEntry.Name[0] == '.' || _status.IsHidden(FullPath);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid it's completely incorrect to map extended attributes to classic attributes.
I think we need new ExtendedAttributes (or something like) on both Unix and Windows.

Copy link
Member Author

@carlossanlop carlossanlop May 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

attributes |= FileAttributes.Directory;

// If the filename starts with a period or has UF_HIDDEN flag set, it's hidden.
if (fileName.Length > 0 && (fileName[0] == '.' || (_fileStatus.UserFlags & (uint)Interop.Sys.UserFlags.UF_HIDDEN) == (uint)Interop.Sys.UserFlags.UF_HIDDEN))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iSazonov, you wrote in the other comment:

I'm afraid it's completely incorrect to map extended attributes to classic attributes.
I think we need new ExtendedAttributes (or something like) on both Unix and Windows.

I completely agree with you that we should have an ExtendedAttributes property. It would solve the problem of having them intermixed with normal attributes.

Extended attributes apply to BSD, Linux, OSX and even for Windows, in the form of Reparse Points.

But as you can see, UF_HIDDEN was already being read in the old code before my PR, and I just made sure it was consistently retrieved in FileSystemInfo, FileSystemEntry and FileStatus.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that it's not an either-or scenario: A platform-specific ExtendedAttributes property definitely makes sense, but it also makes sense to map the UF_HIDDEN flag to a platform-abstracted Hidden attribute (for instance, to the macOS Finder (file manager) both UF_HIDDEN files and files that observe the general Unix name-based convention (name starts with .) are hidden.

Has this ExtendedAttributes property been discussed at all?

Note that macOS has open-ended extended file-system attributes, similar to NTFS alternate streams (use xattr -s -l /tmp to see an example on macOS), but - if I understand correctly - NTFS alternate streams aren't supported (yet) in .NET, so that's probably a discussion for another day.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has this ExtendedAttributes property been discussed at all?

Yes, we have a relatively new issue tracking this request: #49604

Let's take the conversation there.

Copy link
Contributor

@iSazonov iSazonov May 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But as you can see, UF_HIDDEN was already being read in the old code before my PR, and I just made sure it was consistently retrieved in FileSystemInfo, FileSystemEntry and FileStatus.

It was added at 5.0 milestone without in-depth analysis.
I'd suggest to pass the design through in-depth analysis and API review.
My main concern is that it (chflags) is absolutely another API with specific behaviors and specific error codes.
I have not found a standard for these attributes. The most comprehensive list is https://www.freebsd.org/cgi/man.cgi?query=chflags&sektion=2&manpath=freebsd-release-ports
As we can see there are references to DOS, Windows and CIFS FILE_ATTRIBUTE_* attributes. I don't understand what that means and what the design intentions is.
If there are no standard behavior definitions, I would make different APIs to avoid intractable problems in the future.
There's an attribute mapping, but we can't map "." in UF_HIDDEN.
Perhaps the trend is to abandon classic attributes altogether and only use extended attributes. In that case, we definitely shouldn't mix them.
Since the docs speak about "mapping" then surely this API must perform "." mapping in UF_HIDDEN.
The final thought is that we need to be consistent with the other communities (Java, Python, ...).

Copy link

@mklement0 mklement0 May 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After taking a look at #49604 it occurred to me that what we are talking about here is not a case of extended attributes, as the latter are user-definable data with no special meaning to the file-system or the system.

By contrast, the so-called file flags on macOS / FreeBSD - of which UF_HIDDEN is one example - do have system-defined meaning, analogous to the file attributes on Windows.

These file flags do not map cleanly onto the born-on-Windows System.IO.FileAttributes enumeration, though mapping UF_HIDDEN onto Hidden is currently partially implemented:

Examining an enumerated FileSystemInfo instance does surface UF_HIDDEN as the Hidden attribute in .Attributes, but the enumeration itself does not consider such files hidden.

Curiously, the same inconsistency applies to the ls utility on macOS (my guess is that the following also applies to FreeBSD): ls lists UF_HIDDEN files as if they weren't hidden, but ls -lO does list all file flags (including UF_HIDDEN as hidden, the name also used by the chflags utility).
When POSIX-compatible shells on macOS perform globbing, they also do not consider UF_HIDDEN files hidden.

By contrast, Finder, the macOS file manager, equally considers .-initial names and UF_HIDDEN files hidden.

De facto the .Attributes property is already being used to map non-Windows concepts onto the equivalent Windows concepts:

  • Symlinks on Unix-like platforms get the pseudo attribute ReparsePoint
  • The user-specific lack of write permissions is mapped on to pseudo attribute ReadOnly

To me, these mappings make sense, but I agree that they should be thoroughly reviewed, with a view toward extending this mapping; e.g., UF_IMMUTABLE and SF_IMMUTABLE are candidates for mapping onto ReadOnly too.

With respect to UF_HIDDEN, we need to decided whether (a) we want to resolve the current inconsistency and, if so, (b) in what direction.

Consistently mapping both .-initial names and UF_HIDDEN files onto Hidden is defensible, even though in the world of shells it would make PowerShell's behavior then differ from that of ls / POSIX-compatible shells.

then surely this API must perform "." mapping in UF_HIDDEN

I don't think so: it seems fine to me to map into one direction: to have the platform-abstracted Hidden attribute reflect whether the file is effectively hidden, irrespective of the mechanism used, and on macOS / FreeBSD there happen to be two mechanisms available, both of which are - unfortunately only partly - honored by the system.

If we were to introduce a dedicated API for macOS / FreeBSD file flags (again, this is not the same as extended attributes), then it should obviously reflect the true flag values only.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After taking a look at #49604 it occurred to me that what we are talking about here is not a case of extended attributes, as the latter are user-definable data with no special meaning to the file-system or the system.

Yes, I suggest to use another terminology here - file system flags/ fsflags/ FileSystemInfo.Flags.

Since mapping is very questionable and may cause breaking conflicts in the future, I suggest avoiding it now and only presenting it in some way.
The application can be fixed faster than .Net. For example, PowerShell will be able to handle UF_HIDDEN in a special way and this can be changed in any intermediate version, unlike .Net which will remain stable from version to version.

@carlossanlop
Copy link
Member Author

Benchmarks for commit 6ff6dcc :

Result 1
Method Job Toolchain UnrollFactor depth Mean Error StdDev Median Min Max Ratio MannWhitney(3ms) RatioSD Gen 0 Gen 1 Gen 2 Allocated
CreateDirectory Job-VVDLFS /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 20,907.5 ns 1,652.78 ns 1,903.34 ns 19,965.0 ns 18,820.0 ns 25,070.0 ns 1.03 Same 0.11 - - - 497 B
CreateDirectory Job-USGWYY /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 20,497.8 ns 1,189.18 ns 1,272.41 ns 20,285.0 ns 18,720.0 ns 23,030.0 ns 1.00 Base 0.00 - - - 377 B
GetCurrentDirectory Job-YXFPIE /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 584.0 ns 7.45 ns 6.97 ns 584.7 ns 573.7 ns 597.5 ns 0.83 Same 0.02 0.0447 - - 288 B
GetCurrentDirectory Job-XENYPA /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 705.7 ns 9.39 ns 8.78 ns 705.9 ns 691.5 ns 720.3 ns 1.00 Base 0.00 0.0454 - - 288 B
Exists Job-YXFPIE /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 615.5 ns 11.48 ns 10.74 ns 612.5 ns 600.8 ns 633.5 ns 1.01 Same 0.02 - - - -
Exists Job-XENYPA /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 608.7 ns 5.61 ns 4.98 ns 607.3 ns 602.3 ns 618.1 ns 1.00 Base 0.00 - - - -
EnumerateFiles Job-YXFPIE /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,330,084.9 ns 44,555.39 ns 41,677.14 ns 3,306,652.5 ns 3,279,472.5 ns 3,402,281.2 ns 1.02 Same 0.02 137.5000 - - 872,322 B
EnumerateFiles Job-XENYPA /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,267,480.2 ns 43,966.46 ns 41,126.26 ns 3,241,173.8 ns 3,222,187.5 ns 3,335,891.2 ns 1.00 Base 0.00 137.5000 - - 872,322 B
RecursiveCreateDeleteDirectory Job-YXFPIE /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 368,199.4 ns 2,539.93 ns 2,251.58 ns 368,445.9 ns 364,264.6 ns 372,023.5 ns 1.02 Same 0.01 1.5244 - - 9,553 B
RecursiveCreateDeleteDirectory Job-XENYPA /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 362,420.7 ns 4,837.83 ns 4,039.81 ns 361,166.7 ns 357,779.2 ns 372,701.9 ns 1.00 Base 0.00 - - - 8,113 B
RecursiveCreateDeleteDirectory Job-YXFPIE /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 3,989,789.4 ns 76,529.54 ns 67,841.45 ns 3,970,544.2 ns 3,902,195.0 ns 4,109,520.0 ns 1.00 Same 0.02 33.3333 16.6667 - 249,599 B
RecursiveCreateDeleteDirectory Job-XENYPA /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,001,173.6 ns 55,769.50 ns 46,570.06 ns 3,992,644.8 ns 3,937,267.2 ns 4,114,508.6 ns 1.00 Base 0.00 34.4828 17.2414 - 237,348 B
Result 2
Method Job Toolchain UnrollFactor depth Mean Error StdDev Median Min Max Ratio MannWhitney(3ms) RatioSD Gen 0 Gen 1 Gen 2 Allocated
CreateDirectory Job-PDEIQQ /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 22,281.0 ns 1,821.16 ns 2,097.25 ns 22,565.0 ns 19,850.0 ns 26,500.0 ns 1.05 Same 0.12 - - - 497 B
CreateDirectory Job-QLPRFB /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 21,302.6 ns 1,008.09 ns 1,120.49 ns 21,200.0 ns 19,580.0 ns 23,820.0 ns 1.00 Base 0.00 - - - 377 B
GetCurrentDirectory Job-TIPGOK /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 575.3 ns 7.90 ns 6.60 ns 574.3 ns 563.4 ns 584.9 ns 0.99 Same 0.02 0.0446 - - 288 B
GetCurrentDirectory Job-ASCMUY /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 578.9 ns 7.63 ns 7.14 ns 578.7 ns 569.9 ns 591.9 ns 1.00 Base 0.00 0.0437 - - 288 B
Exists Job-TIPGOK /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 609.4 ns 5.52 ns 4.89 ns 608.1 ns 603.5 ns 620.9 ns 1.00 Same 0.01 - - - -
Exists Job-ASCMUY /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 609.0 ns 5.43 ns 5.08 ns 609.5 ns 598.9 ns 618.9 ns 1.00 Base 0.00 - - - -
EnumerateFiles Job-TIPGOK /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,320,337.6 ns 32,643.41 ns 28,937.53 ns 3,321,426.9 ns 3,281,377.5 ns 3,384,825.0 ns 1.01 Same 0.01 137.5000 - - 872,322 B
EnumerateFiles Job-ASCMUY /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,274,043.7 ns 40,312.68 ns 35,736.14 ns 3,274,650.0 ns 3,221,603.8 ns 3,339,098.8 ns 1.00 Base 0.00 137.5000 - - 872,321 B
RecursiveCreateDeleteDirectory Job-TIPGOK /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 375,231.9 ns 5,741.47 ns 5,370.58 ns 374,680.9 ns 369,300.2 ns 385,922.2 ns 1.03 Same 0.02 - - - 9,553 B
RecursiveCreateDeleteDirectory Job-ASCMUY /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 364,259.4 ns 5,427.89 ns 5,077.25 ns 364,395.2 ns 356,805.5 ns 373,018.8 ns 1.00 Base 0.00 - - - 8,113 B
RecursiveCreateDeleteDirectory Job-TIPGOK /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 3,936,271.2 ns 54,581.87 ns 48,385.40 ns 3,917,425.0 ns 3,894,454.7 ns 4,036,285.9 ns 1.01 Same 0.01 31.2500 15.6250 - 249,587 B
RecursiveCreateDeleteDirectory Job-ASCMUY /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 3,892,693.0 ns 48,646.46 ns 37,979.96 ns 3,890,176.6 ns 3,840,934.4 ns 3,973,734.4 ns 1.00 Base 0.00 31.2500 15.6250 - 237,356 B
Result 3
Method Job Toolchain UnrollFactor depth Mean Error StdDev Median Min Max Ratio MannWhitney(3ms) RatioSD Gen 0 Gen 1 Gen 2 Allocated
CreateDirectory Job-ESOYGA /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 21,756.8 ns 1,577.26 ns 1,753.11 ns 21,950.0 ns 19,340.0 ns 26,420.0 ns 1.08 Same 0.12 - - - 497 B
CreateDirectory Job-YZLVZL /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 20,193.5 ns 1,319.99 ns 1,520.10 ns 19,360.0 ns 18,660.0 ns 23,450.0 ns 1.00 Base 0.00 - - - 377 B
GetCurrentDirectory Job-RFQHQQ /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 700.9 ns 8.01 ns 7.10 ns 700.9 ns 688.6 ns 716.8 ns 1.20 Same 0.02 0.0441 - - 288 B
GetCurrentDirectory Job-QKYKLI /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 583.5 ns 10.20 ns 9.54 ns 581.8 ns 567.7 ns 606.2 ns 1.00 Base 0.00 0.0447 - - 288 B
Exists Job-RFQHQQ /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 609.8 ns 7.87 ns 6.57 ns 607.0 ns 602.8 ns 625.9 ns 0.98 Same 0.03 - - - -
Exists Job-QKYKLI /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 617.9 ns 14.29 ns 16.46 ns 609.8 ns 600.6 ns 649.3 ns 1.00 Base 0.00 - - - -
EnumerateFiles Job-RFQHQQ /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,365,645.5 ns 36,844.50 ns 32,661.69 ns 3,370,111.9 ns 3,296,841.2 ns 3,418,535.0 ns 1.03 Same 0.01 137.5000 - - 872,322 B
EnumerateFiles Job-QKYKLI /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,260,103.9 ns 32,985.98 ns 27,544.79 ns 3,254,982.5 ns 3,216,381.2 ns 3,293,961.2 ns 1.00 Base 0.00 137.5000 - - 872,321 B
RecursiveCreateDeleteDirectory Job-RFQHQQ /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 490,605.6 ns 87,642.26 ns 100,928.96 ns 560,925.3 ns 361,054.6 ns 597,503.8 ns 1.54 Same 0.17 - - - 9,553 B
RecursiveCreateDeleteDirectory Job-QKYKLI /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 359,853.2 ns 6,111.45 ns 5,103.34 ns 359,146.7 ns 353,130.4 ns 370,652.6 ns 1.00 Base 0.00 - - - 8,113 B
RecursiveCreateDeleteDirectory Job-RFQHQQ /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 3,997,207.8 ns 43,389.81 ns 38,463.93 ns 3,989,723.4 ns 3,934,275.0 ns 4,079,842.2 ns 1.00 Same 0.02 31.2500 15.6250 - 249,611 B
RecursiveCreateDeleteDirectory Job-QKYKLI /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 3,990,376.3 ns 67,516.31 ns 69,334.28 ns 3,974,352.4 ns 3,903,960.3 ns 4,166,361.9 ns 1.00 Base 0.00 31.7460 15.8730 - 237,363 B
Result 4
Method Job Toolchain UnrollFactor depth Mean Error StdDev Median Min Max Ratio MannWhitney(3ms) RatioSD Gen 0 Gen 1 Gen 2 Allocated
CreateDirectory Job-KIGLKG /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 20,992.8 ns 1,402.30 ns 1,500.45 ns 20,535.0 ns 19,350.0 ns 23,640.0 ns 1.07 Same 0.08 - - - 497 B
CreateDirectory Job-EMXAJI /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 19,603.9 ns 760.41 ns 813.63 ns 19,310.0 ns 18,930.0 ns 21,950.0 ns 1.00 Base 0.00 - - - 377 B
GetCurrentDirectory Job-MVQPHR /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 579.0 ns 11.35 ns 11.15 ns 574.4 ns 567.6 ns 603.1 ns 1.00 Same 0.02 0.0442 - - 288 B
GetCurrentDirectory Job-WZZAJC /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 579.0 ns 8.36 ns 7.82 ns 575.7 ns 569.3 ns 596.3 ns 1.00 Base 0.00 0.0437 - - 288 B
Exists Job-MVQPHR /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 628.0 ns 4.98 ns 4.66 ns 626.4 ns 622.0 ns 636.0 ns 1.03 Same 0.01 - - - -
Exists Job-WZZAJC /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 613.3 ns 7.69 ns 6.42 ns 613.2 ns 605.5 ns 627.4 ns 1.00 Base 0.00 - - - -
EnumerateFiles Job-MVQPHR /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,338,918.3 ns 22,794.04 ns 20,206.32 ns 3,333,450.0 ns 3,315,165.6 ns 3,384,576.6 ns 1.03 Same 0.01 125.0000 - - 872,324 B
EnumerateFiles Job-WZZAJC /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,248,919.3 ns 24,134.01 ns 21,394.17 ns 3,242,780.0 ns 3,226,401.2 ns 3,301,188.8 ns 1.00 Base 0.00 137.5000 - - 872,322 B
RecursiveCreateDeleteDirectory Job-MVQPHR /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 370,444.9 ns 3,798.53 ns 3,367.30 ns 370,755.9 ns 363,592.2 ns 374,380.8 ns 1.02 Same 0.02 1.5244 - - 9,553 B
RecursiveCreateDeleteDirectory Job-WZZAJC /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 362,530.4 ns 7,855.72 ns 8,067.25 ns 361,288.3 ns 351,859.0 ns 384,128.5 ns 1.00 Base 0.00 - - - 8,113 B
RecursiveCreateDeleteDirectory Job-MVQPHR /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 3,976,912.1 ns 57,024.36 ns 50,550.61 ns 3,982,212.1 ns 3,898,264.5 ns 4,097,304.8 ns 1.01 Same 0.02 32.2581 16.1290 - 249,588 B
RecursiveCreateDeleteDirectory Job-WZZAJC /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 3,954,625.2 ns 79,623.92 ns 88,501.77 ns 3,933,041.3 ns 3,837,947.6 ns 4,162,442.9 ns 1.00 Base 0.00 31.7460 15.8730 - 237,363 B

…cessibility of methods/properties. Addressing suggestions.
@carlossanlop
Copy link
Member Author

Benchmark results for commit 2423af0 :

Result 1
Method Job Toolchain UnrollFactor depth Mean Error StdDev Median Min Max Ratio MannWhitney(3ms) RatioSD Gen 0 Gen 1 Gen 2 Allocated
CreateDirectory Job-PYCATU /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 20,510.0 ns 1,152.13 ns 1,280.59 ns 20,250.0 ns 19,100.0 ns 23,090.0 ns 1.04 Same 0.08 - - - 497 B
CreateDirectory Job-FGAOLC /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 19,722.0 ns 971.28 ns 1,118.53 ns 19,215.0 ns 18,710.0 ns 22,220.0 ns 1.00 Base 0.00 - - - 377 B
GetCurrentDirectory Job-LUFDZF /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 755.0 ns 7.84 ns 7.34 ns 754.5 ns 733.2 ns 763.5 ns 1.22 Same 0.02 0.0446 - - 288 B
GetCurrentDirectory Job-NLQLLB /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 619.9 ns 6.14 ns 5.45 ns 621.4 ns 604.7 ns 624.8 ns 1.00 Base 0.00 0.0452 - - 288 B
Exists Job-LUFDZF /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 630.8 ns 2.84 ns 2.52 ns 629.9 ns 627.8 ns 635.3 ns 0.98 Same 0.01 - - - -
Exists Job-NLQLLB /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 641.1 ns 2.85 ns 2.38 ns 639.8 ns 638.7 ns 645.7 ns 1.00 Base 0.00 - - - -
EnumerateFiles Job-LUFDZF /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,623,996.8 ns 11,848.92 ns 11,083.49 ns 3,626,673.8 ns 3,604,285.0 ns 3,641,355.0 ns 1.05 Same 0.01 137.5000 - - 872,322 B
EnumerateFiles Job-NLQLLB /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,456,606.4 ns 20,206.76 ns 18,901.42 ns 3,456,805.0 ns 3,427,641.2 ns 3,495,478.8 ns 1.00 Base 0.00 137.5000 - - 872,322 B
RecursiveCreateDeleteDirectory Job-LUFDZF /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 383,865.2 ns 3,777.14 ns 3,348.34 ns 383,845.9 ns 377,380.6 ns 389,883.4 ns 1.01 Same 0.01 1.5244 - - 9,553 B
RecursiveCreateDeleteDirectory Job-NLQLLB /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 378,701.3 ns 1,532.01 ns 1,279.30 ns 378,456.1 ns 377,142.9 ns 381,875.3 ns 1.00 Base 0.00 - - - 8,113 B
RecursiveCreateDeleteDirectory Job-LUFDZF /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,150,051.5 ns 45,827.62 ns 42,867.18 ns 4,135,498.2 ns 4,085,964.9 ns 4,217,273.7 ns 0.99 Same 0.01 35.0877 17.5439 - 249,589 B
RecursiveCreateDeleteDirectory Job-NLQLLB /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,180,299.5 ns 53,252.12 ns 47,206.62 ns 4,186,552.5 ns 4,090,898.3 ns 4,256,348.3 ns 1.00 Base 0.00 33.3333 16.6667 - 237,348 B
Result 2
Method Job Toolchain UnrollFactor depth Mean Error StdDev Median Min Max Ratio MannWhitney(3ms) RatioSD Gen 0 Gen 1 Gen 2 Allocated
CreateDirectory Job-IKOLOY /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 20,323.2 ns 870.59 ns 967.66 ns 19,960.0 ns 19,220.0 ns 22,630.0 ns 0.93 Same 0.12 - - - 497 B
CreateDirectory Job-WZDJPF /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 22,425.0 ns 3,119.36 ns 3,592.26 ns 21,065.0 ns 19,390.0 ns 30,790.0 ns 1.00 Base 0.00 - - - 377 B
GetCurrentDirectory Job-JMKWUK /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 622.7 ns 8.40 ns 7.85 ns 623.8 ns 609.6 ns 635.5 ns 1.01 Same 0.02 0.0450 - - 288 B
GetCurrentDirectory Job-XQLUZF /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 618.8 ns 10.89 ns 10.19 ns 621.1 ns 601.0 ns 632.9 ns 1.00 Base 0.00 0.0455 - - 288 B
Exists Job-JMKWUK /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 628.5 ns 5.67 ns 5.30 ns 626.6 ns 621.5 ns 637.6 ns 0.99 Same 0.01 - - - -
Exists Job-XQLUZF /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 633.6 ns 6.23 ns 5.20 ns 632.8 ns 627.2 ns 647.3 ns 1.00 Base 0.00 - - - -
EnumerateFiles Job-JMKWUK /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,632,845.3 ns 37,983.36 ns 35,529.66 ns 3,624,150.0 ns 3,578,267.2 ns 3,691,767.2 ns 1.05 Same 0.01 125.0000 - - 872,324 B
EnumerateFiles Job-XQLUZF /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,472,034.9 ns 29,201.62 ns 27,315.22 ns 3,462,896.2 ns 3,411,270.0 ns 3,518,593.8 ns 1.00 Base 0.00 137.5000 - - 872,321 B
RecursiveCreateDeleteDirectory Job-JMKWUK /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 381,956.1 ns 2,719.51 ns 2,410.78 ns 382,616.1 ns 377,222.0 ns 385,398.1 ns 1.01 Same 0.01 1.4881 - - 9,553 B
RecursiveCreateDeleteDirectory Job-XQLUZF /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 379,857.8 ns 3,463.14 ns 3,069.98 ns 378,387.6 ns 376,306.2 ns 386,016.5 ns 1.00 Base 0.00 - - - 8,113 B
RecursiveCreateDeleteDirectory Job-JMKWUK /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,196,538.5 ns 45,688.77 ns 40,501.90 ns 4,189,187.1 ns 4,145,500.0 ns 4,274,684.5 ns 0.99 Same 0.02 34.4828 17.2414 - 249,598 B
RecursiveCreateDeleteDirectory Job-XQLUZF /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,228,410.9 ns 53,289.77 ns 47,239.99 ns 4,228,038.1 ns 4,157,230.5 ns 4,299,239.0 ns 1.00 Base 0.00 33.8983 16.9492 - 237,348 B
Result 3
Method Job Toolchain UnrollFactor depth Mean Error StdDev Median Min Max Ratio MannWhitney(3ms) RatioSD Gen 0 Gen 1 Gen 2 Allocated
CreateDirectory Job-OHWLGI /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 20,966.7 ns 1,711.29 ns 1,831.06 ns 20,210.0 ns 18,990.0 ns 25,330.0 ns 1.06 Same 0.11 - - - 497 B
CreateDirectory Job-HPJXYI /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 19,872.1 ns 876.64 ns 974.39 ns 19,590.0 ns 18,890.0 ns 22,460.0 ns 1.00 Base 0.00 - - - 377 B
GetCurrentDirectory Job-PJYUZW /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 629.1 ns 5.30 ns 4.96 ns 628.3 ns 617.5 ns 637.4 ns 1.02 Same 0.02 0.0451 - - 288 B
GetCurrentDirectory Job-TSNWTD /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 618.3 ns 9.42 ns 7.87 ns 621.1 ns 597.7 ns 623.7 ns 1.00 Base 0.00 0.0448 - - 288 B
Exists Job-PJYUZW /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 625.4 ns 2.30 ns 1.92 ns 625.3 ns 622.8 ns 629.5 ns 1.00 Same 0.00 - - - -
Exists Job-TSNWTD /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 627.6 ns 1.99 ns 1.66 ns 627.0 ns 624.8 ns 630.2 ns 1.00 Base 0.00 - - - -
EnumerateFiles Job-PJYUZW /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,618,864.3 ns 31,422.81 ns 29,392.91 ns 3,623,175.0 ns 3,561,137.5 ns 3,683,871.9 ns 1.03 Same 0.01 125.0000 - - 872,323 B
EnumerateFiles Job-TSNWTD /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,496,475.0 ns 42,470.86 ns 37,649.31 ns 3,508,363.3 ns 3,371,689.8 ns 3,517,394.5 ns 1.00 Base 0.00 125.0000 - - 872,324 B
RecursiveCreateDeleteDirectory Job-PJYUZW /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 377,562.2 ns 2,964.31 ns 2,627.79 ns 377,282.3 ns 374,020.8 ns 383,973.1 ns 1.00 Same 0.01 - - - 9,553 B
RecursiveCreateDeleteDirectory Job-TSNWTD /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 377,386.5 ns 2,170.89 ns 2,030.65 ns 377,742.3 ns 374,507.0 ns 380,499.4 ns 1.00 Base 0.00 - - - 8,113 B
RecursiveCreateDeleteDirectory Job-PJYUZW /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,158,293.7 ns 19,667.89 ns 17,435.08 ns 4,158,608.6 ns 4,128,251.7 ns 4,185,205.2 ns 1.00 Same 0.01 34.4828 17.2414 - 249,598 B
RecursiveCreateDeleteDirectory Job-TSNWTD /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,148,954.2 ns 36,124.48 ns 33,790.87 ns 4,155,380.3 ns 4,080,109.8 ns 4,203,636.1 ns 1.00 Base 0.00 32.7869 16.3934 - 237,348 B
Result 4
Method Job Toolchain UnrollFactor depth Mean Error StdDev Median Min Max Ratio MannWhitney(3ms) RatioSD Gen 0 Gen 1 Gen 2 Allocated
CreateDirectory Job-MGMFOL /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 23,158.9 ns 3,756.88 ns 4,175.76 ns 21,470.0 ns 19,400.0 ns 31,990.0 ns 1.12 Same 0.16 - - - 497 B
CreateDirectory Job-KAYZCM /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 20,604.7 ns 1,136.91 ns 1,263.68 ns 20,260.0 ns 19,170.0 ns 23,910.0 ns 1.00 Base 0.00 - - - 377 B
GetCurrentDirectory Job-WMDMWS /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 614.9 ns 7.30 ns 6.09 ns 614.6 ns 604.8 ns 628.0 ns 0.98 Same 0.02 0.0445 - - 288 B
GetCurrentDirectory Job-ZNOIKF /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 625.9 ns 6.61 ns 6.18 ns 626.3 ns 610.9 ns 637.3 ns 1.00 Base 0.00 0.0443 - - 288 B
Exists Job-WMDMWS /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 631.5 ns 6.34 ns 5.29 ns 631.5 ns 624.4 ns 643.4 ns 0.99 Same 0.01 - - - -
Exists Job-ZNOIKF /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 636.0 ns 5.50 ns 4.88 ns 634.3 ns 630.6 ns 646.4 ns 1.00 Base 0.00 - - - -
EnumerateFiles Job-WMDMWS /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,684,260.1 ns 41,328.66 ns 34,511.30 ns 3,682,720.3 ns 3,638,531.2 ns 3,773,748.4 ns 1.05 Same 0.01 125.0000 - - 872,324 B
EnumerateFiles Job-ZNOIKF /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,507,608.8 ns 60,876.35 ns 50,834.51 ns 3,516,359.4 ns 3,440,853.1 ns 3,597,017.2 ns 1.00 Base 0.00 125.0000 - - 872,324 B
RecursiveCreateDeleteDirectory Job-WMDMWS /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 387,218.6 ns 3,155.10 ns 2,634.65 ns 387,103.0 ns 382,537.0 ns 392,134.3 ns 1.01 Same 0.01 1.5244 - - 9,553 B
RecursiveCreateDeleteDirectory Job-ZNOIKF /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 384,995.0 ns 5,847.69 ns 4,883.08 ns 384,598.8 ns 378,763.1 ns 396,454.1 ns 1.00 Base 0.00 - - - 8,113 B
RecursiveCreateDeleteDirectory Job-WMDMWS /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,216,276.8 ns 59,835.40 ns 53,042.52 ns 4,201,937.3 ns 4,149,579.7 ns 4,336,372.9 ns 0.99 Same 0.02 33.8983 16.9492 - 249,588 B
RecursiveCreateDeleteDirectory Job-ZNOIKF /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,264,775.7 ns 86,587.22 ns 96,241.47 ns 4,229,869.8 ns 4,146,198.1 ns 4,498,635.8 ns 1.00 Base 0.00 37.7358 18.8679 - 237,350 B

… struct initialization. Simplify the order in which Initialize checks for unknown and symlink and add a comment.
@carlossanlop
Copy link
Member Author

Benchmark results for commit 7de7c4a :

Result 1
Method Job Toolchain UnrollFactor depth Mean Error StdDev Median Min Max Ratio MannWhitney(3ms) RatioSD Gen 0 Gen 1 Gen 2 Allocated
CreateDirectory Job-WICJCY /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 21,993.7 ns 1,814.35 ns 2,016.65 ns 21,690.0 ns 19,410.0 ns 27,760.0 ns 1.04 Same 0.08 - - - 497 B
CreateDirectory Job-TORSXT /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 21,108.9 ns 1,196.24 ns 1,329.62 ns 20,490.0 ns 19,560.0 ns 24,050.0 ns 1.00 Base 0.00 - - - 377 B
GetCurrentDirectory Job-LOOJLZ /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 600.6 ns 7.93 ns 7.41 ns 599.2 ns 589.3 ns 616.6 ns 1.01 Same 0.02 0.0452 - - 288 B
GetCurrentDirectory Job-BCENGW /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 593.3 ns 9.21 ns 8.62 ns 591.9 ns 577.3 ns 605.0 ns 1.00 Base 0.00 0.0448 - - 288 B
Exists Job-LOOJLZ /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 622.9 ns 6.24 ns 5.53 ns 623.5 ns 614.1 ns 633.5 ns 1.01 Same 0.01 - - - -
Exists Job-BCENGW /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 615.3 ns 2.12 ns 1.87 ns 615.2 ns 611.9 ns 618.8 ns 1.00 Base 0.00 - - - -
EnumerateFiles Job-LOOJLZ /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,494,527.5 ns 25,600.43 ns 22,694.12 ns 3,494,793.8 ns 3,453,531.2 ns 3,537,435.9 ns 1.04 Same 0.01 125.0000 - - 872,324 B
EnumerateFiles Job-BCENGW /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,348,581.5 ns 28,799.32 ns 26,938.90 ns 3,357,093.8 ns 3,306,862.5 ns 3,385,490.0 ns 1.00 Base 0.00 137.5000 - - 872,321 B
RecursiveCreateDeleteDirectory Job-LOOJLZ /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 370,109.4 ns 5,913.57 ns 4,938.10 ns 369,765.3 ns 362,168.8 ns 381,654.4 ns 1.01 Same 0.02 1.4535 - - 9,553 B
RecursiveCreateDeleteDirectory Job-BCENGW /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 367,434.2 ns 4,168.79 ns 3,695.52 ns 366,636.3 ns 361,772.0 ns 374,002.5 ns 1.00 Base 0.00 - - - 8,114 B
RecursiveCreateDeleteDirectory Job-LOOJLZ /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,042,290.7 ns 29,984.26 ns 26,580.27 ns 4,041,184.7 ns 4,005,667.7 ns 4,104,238.7 ns 1.00 Same 0.01 32.2581 16.1290 - 249,588 B
RecursiveCreateDeleteDirectory Job-BCENGW /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,031,567.4 ns 33,931.55 ns 28,334.38 ns 4,033,351.6 ns 3,989,146.8 ns 4,090,862.9 ns 1.00 Base 0.00 32.2581 16.1290 - 237,357 B
Result 2
Method Job Toolchain UnrollFactor depth Mean Error StdDev Median Min Max Ratio MannWhitney(3ms) RatioSD Gen 0 Gen 1 Gen 2 Allocated
CreateDirectory Job-YXMUDF /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 22,390.6 ns 1,997.32 ns 2,137.11 ns 22,185.0 ns 19,720.0 ns 27,630.0 ns 1.04 Same 0.14 - - - 497 B
CreateDirectory Job-ODUHPI /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 21,580.6 ns 1,281.88 ns 1,371.60 ns 21,460.0 ns 19,530.0 ns 24,020.0 ns 1.00 Base 0.00 - - - 377 B
GetCurrentDirectory Job-UHJMUY /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 598.3 ns 7.28 ns 6.45 ns 597.2 ns 586.9 ns 608.6 ns 0.98 Same 0.01 0.0456 - - 288 B
GetCurrentDirectory Job-LGWYQU /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 609.0 ns 5.34 ns 4.73 ns 610.0 ns 601.1 ns 618.3 ns 1.00 Base 0.00 0.0458 - - 288 B
Exists Job-UHJMUY /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 622.9 ns 5.67 ns 5.03 ns 623.0 ns 613.7 ns 629.7 ns 1.00 Same 0.01 - - - -
Exists Job-LGWYQU /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 621.9 ns 3.18 ns 2.65 ns 621.9 ns 616.5 ns 628.0 ns 1.00 Base 0.00 - - - -
EnumerateFiles Job-UHJMUY /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,507,915.2 ns 42,171.03 ns 37,383.52 ns 3,511,701.6 ns 3,401,420.3 ns 3,562,781.2 ns 1.05 Same 0.02 125.0000 - - 872,323 B
EnumerateFiles Job-LGWYQU /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,352,109.8 ns 52,596.10 ns 49,198.43 ns 3,337,812.5 ns 3,280,206.2 ns 3,442,621.2 ns 1.00 Base 0.00 137.5000 - - 872,321 B
RecursiveCreateDeleteDirectory Job-UHJMUY /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 373,640.4 ns 3,882.35 ns 3,441.60 ns 373,903.2 ns 367,656.9 ns 378,638.7 ns 1.01 Same 0.01 1.4599 - - 9,554 B
RecursiveCreateDeleteDirectory Job-LGWYQU /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 369,925.1 ns 4,991.45 ns 4,424.79 ns 370,261.9 ns 362,553.8 ns 375,046.4 ns 1.00 Base 0.00 - - - 8,113 B
RecursiveCreateDeleteDirectory Job-UHJMUY /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,080,033.7 ns 35,540.37 ns 31,505.61 ns 4,080,944.2 ns 4,027,708.3 ns 4,130,751.7 ns 1.00 Same 0.02 33.3333 16.6667 - 249,588 B
RecursiveCreateDeleteDirectory Job-LGWYQU /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,086,830.4 ns 75,475.36 ns 66,906.94 ns 4,090,776.3 ns 3,996,698.3 ns 4,211,542.4 ns 1.00 Base 0.00 33.8983 16.9492 - 237,348 B
Result 3
Method Job Toolchain UnrollFactor depth Mean Error StdDev Median Min Max Ratio MannWhitney(3ms) RatioSD Gen 0 Gen 1 Gen 2 Allocated
CreateDirectory Job-JKCHNI /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 21,782.1 ns 925.04 ns 1,028.18 ns 21,620.0 ns 20,060.0 ns 23,380.0 ns 1.04 Same 0.08 - - - 497 B
CreateDirectory Job-DNEBMK /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 20,963.7 ns 1,220.51 ns 1,356.60 ns 21,000.0 ns 18,620.0 ns 23,930.0 ns 1.00 Base 0.00 - - - 377 B
GetCurrentDirectory Job-BUOJVK /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 590.8 ns 5.64 ns 5.00 ns 590.7 ns 581.0 ns 599.9 ns 0.99 Same 0.01 0.0446 - - 288 B
GetCurrentDirectory Job-QBCFZL /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 594.2 ns 6.57 ns 5.83 ns 595.8 ns 579.5 ns 601.9 ns 1.00 Base 0.00 0.0447 - - 288 B
Exists Job-BUOJVK /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 623.0 ns 5.81 ns 4.85 ns 622.1 ns 616.8 ns 635.5 ns 1.00 Same 0.01 - - - -
Exists Job-QBCFZL /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 624.5 ns 7.42 ns 6.58 ns 623.7 ns 616.5 ns 638.3 ns 1.00 Base 0.00 - - - -
EnumerateFiles Job-BUOJVK /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,473,835.0 ns 36,386.90 ns 32,256.04 ns 3,484,494.5 ns 3,412,528.9 ns 3,514,047.7 ns 1.02 Same 0.01 125.0000 - - 872,324 B
EnumerateFiles Job-QBCFZL /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,389,675.2 ns 39,248.15 ns 36,712.75 ns 3,397,813.8 ns 3,326,082.5 ns 3,456,905.0 ns 1.00 Base 0.00 137.5000 - - 872,321 B
RecursiveCreateDeleteDirectory Job-BUOJVK /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 375,811.6 ns 4,074.54 ns 3,611.98 ns 375,601.2 ns 370,514.2 ns 383,675.7 ns 1.01 Same 0.02 1.4535 - - 9,553 B
RecursiveCreateDeleteDirectory Job-QBCFZL /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 370,439.7 ns 5,412.48 ns 4,798.02 ns 369,431.7 ns 363,972.8 ns 380,177.0 ns 1.00 Base 0.00 - - - 8,113 B
RecursiveCreateDeleteDirectory Job-BUOJVK /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,073,247.5 ns 42,922.28 ns 35,842.05 ns 4,076,480.3 ns 4,009,627.9 ns 4,151,306.6 ns 1.00 Same 0.01 32.7869 16.3934 - 249,588 B
RecursiveCreateDeleteDirectory Job-QBCFZL /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,060,052.2 ns 34,558.11 ns 30,634.87 ns 4,058,307.4 ns 4,014,598.4 ns 4,115,075.4 ns 1.00 Base 0.00 32.7869 16.3934 - 237,348 B
Result 4
Method Job Toolchain UnrollFactor depth Mean Error StdDev Median Min Max Ratio MannWhitney(3ms) RatioSD Gen 0 Gen 1 Gen 2 Allocated
CreateDirectory Job-XNJQPO /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 23,286.0 ns 3,883.35 ns 4,472.07 ns 21,720.0 ns 18,590.0 ns 32,620.0 ns 1.02 Same 0.22 - - - 497 B
CreateDirectory Job-PCSTDC /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 23,535.6 ns 2,935.35 ns 3,140.79 ns 22,580.0 ns 20,220.0 ns 29,090.0 ns 1.00 Base 0.00 - - - 377 B
GetCurrentDirectory Job-JWWACV /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 612.2 ns 8.34 ns 7.80 ns 615.6 ns 595.2 ns 622.5 ns 1.01 Same 0.02 0.0451 - - 288 B
GetCurrentDirectory Job-AHMTWF /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 608.0 ns 5.43 ns 5.08 ns 608.7 ns 599.5 ns 616.3 ns 1.00 Base 0.00 0.0457 - - 288 B
Exists Job-JWWACV /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 621.7 ns 6.35 ns 5.94 ns 619.3 ns 615.4 ns 630.8 ns 1.01 Same 0.01 - - - -
Exists Job-AHMTWF /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 617.7 ns 4.97 ns 4.41 ns 617.4 ns 609.9 ns 627.3 ns 1.00 Base 0.00 - - - -
EnumerateFiles Job-JWWACV /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,461,539.9 ns 19,778.91 ns 18,501.20 ns 3,458,100.0 ns 3,438,839.7 ns 3,491,215.1 ns 1.03 Same 0.01 136.9863 - - 872,322 B
EnumerateFiles Job-AHMTWF /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,357,044.1 ns 22,147.34 ns 17,291.18 ns 3,364,237.5 ns 3,323,487.5 ns 3,373,929.7 ns 1.00 Base 0.00 125.0000 - - 872,324 B
RecursiveCreateDeleteDirectory Job-JWWACV /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 373,480.3 ns 6,013.38 ns 5,021.44 ns 372,166.6 ns 365,819.6 ns 385,601.3 ns 1.01 Same 0.02 1.4728 - - 9,556 B
RecursiveCreateDeleteDirectory Job-AHMTWF /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 369,102.5 ns 3,437.55 ns 2,870.51 ns 368,691.5 ns 363,317.7 ns 373,402.4 ns 1.00 Base 0.00 - - - 8,113 B
RecursiveCreateDeleteDirectory Job-JWWACV /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,117,220.3 ns 40,992.42 ns 34,230.53 ns 4,129,141.0 ns 4,046,865.6 ns 4,166,032.8 ns 1.02 Same 0.01 32.7869 16.3934 - 249,588 B
RecursiveCreateDeleteDirectory Job-AHMTWF /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 4,048,455.6 ns 35,802.22 ns 27,952.02 ns 4,054,967.5 ns 3,989,176.7 ns 4,103,521.7 ns 1.00 Base 0.00 33.3333 16.6667 - 237,358 B

@carlossanlop
Copy link
Member Author

Ping @Jozkee @adamsitnik - I have addressed the latest feedback, including some I received from David in our last call.

Copy link
Contributor

@iSazonov iSazonov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (with fundamental design questions as discussed).

carlossanlop added 7 commits May 7, 2021 14:38
…conditions: symlink and unknown, so use else if.
…ialize if in AttributesToSkip we are going to retrieve it anyway with a disk hit. Only in the case of DT_UNKNOWN, we will pre-retrieve the file cache, but we only need it when ShouldSkip is checked, and in that case, we won't have a disk hit.
@carlossanlop
Copy link
Member Author

@Jozkee Benchmark results for commit 7f6cee4 :

/home/carlos/.dotnet/dotnet run \
    --project /home/carlos/performance/src/benchmarks/micro/MicroBenchmarks.csproj \
    -c Release \
    -f net6.0 \
    --artifacts /home/carlos/perf_together \
    --coreRun \
            /home/carlos/runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun \
            /home/carlos/runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun \
    --cli /home/carlos/.dotnet/dotnet \
    --statisticalTest 3ms \
    --filter System.IO.Tests.Perf_Directory* \
    --MinIterationCount 100 \
    --MaxIterationCount 101
Method Job Toolchain UnrollFactor depth Mean Error StdDev Median Min Max Ratio MannWhitney(3ms) RatioSD Gen 0 Gen 1 Gen 2 Allocated
CreateDirectory Job-RKWOHL /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 18,947.3 ns 373.06 ns 1,076.36 ns 18,625.0 ns 17,440.0 ns 21,890.0 ns 1.00 Same 0.07 - - - 513 B
CreateDirectory Job-SJWGTR /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 1 ? 19,071.0 ns 313.06 ns 888.09 ns 18,830.0 ns 17,850.0 ns 22,030.0 ns 1.00 Base 0.00 - - - 377 B
GetCurrentDirectory Job-MUHPJU /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 588.0 ns 7.98 ns 23.53 ns 589.9 ns 556.3 ns 651.6 ns 0.96 Same 0.04 0.0443 - - 288 B
GetCurrentDirectory Job-MYGPKW /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 613.0 ns 2.00 ns 5.73 ns 613.4 ns 599.7 ns 629.0 ns 1.00 Base 0.00 0.0435 - - 288 B
Exists Job-MUHPJU /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 620.1 ns 1.41 ns 3.88 ns 619.7 ns 611.7 ns 630.1 ns 1.00 Same 0.01 - - - -
Exists Job-MYGPKW /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 619.9 ns 1.01 ns 2.92 ns 619.9 ns 612.6 ns 625.0 ns 1.00 Base 0.00 - - - -
EnumerateFiles Job-MUHPJU /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,436,544.9 ns 16,315.37 ns 46,548.66 ns 3,441,405.6 ns 3,229,990.6 ns 3,530,718.1 ns 1.03 Same 0.02 137.5000 - - 872,321 B
EnumerateFiles Job-MYGPKW /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 ? 3,341,357.5 ns 19,165.26 ns 54,368.65 ns 3,354,962.5 ns 3,179,592.5 ns 3,432,500.0 ns 1.00 Base 0.00 137.5000 - - 872,321 B
RecursiveCreateDeleteDirectory Job-MUHPJU /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 363,536.4 ns 1,309.83 ns 3,715.77 ns 363,658.3 ns 350,198.1 ns 370,924.1 ns 0.99 Same 0.01 1.4881 - - 9,745 B
RecursiveCreateDeleteDirectory Job-MYGPKW /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 10 366,448.3 ns 1,453.76 ns 4,052.49 ns 367,211.2 ns 354,062.9 ns 374,556.9 ns 1.00 Base 0.00 - - - 8,113 B
RecursiveCreateDeleteDirectory Job-MUHPJU /runtime/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 3,931,197.8 ns 15,250.87 ns 43,264.19 ns 3,924,756.2 ns 3,801,907.8 ns 4,037,179.7 ns 1.00 Same 0.02 31.2500 15.6250 - 251,219 B
RecursiveCreateDeleteDirectory Job-MYGPKW /runtime_base/artifacts/bin/testhost/net6.0-Linux-Release-x64/shared/Microsoft.NETCore.App/6.0.0/corerun 16 100 3,927,164.2 ns 12,361.81 ns 34,459.78 ns 3,931,016.9 ns 3,824,054.8 ns 4,020,066.1 ns 1.00 Base 0.00 32.2581 16.1290 - 237,348 B

Comment on lines +127 to +134
// Avoid disk hit first
if (IsNameHidden(fileName))
{
// Others permissions
readBit = Interop.Sys.Permissions.S_IROTH;
writeBit = Interop.Sys.Permissions.S_IWOTH;
return true;
}
#endif
EnsureCachesInitialized(path, continueOnError);
return HasHiddenFlag;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC you mentioned that UF_HIDDEN is only effective in OSX, if so we should consider splitting this implementation and optimize Unix by avoiding the native call.

Copy link
Member

@Jozkee Jozkee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

@carlossanlop carlossanlop merged commit 6a81cfa into dotnet:main May 8, 2021
System.IO - File links automation moved this from Reviewer approved to Done May 8, 2021
@carlossanlop carlossanlop deleted the FileAttributes branch May 8, 2021 19:07
@iSazonov
Copy link
Contributor

iSazonov commented May 8, 2021

@carlossanlop Great work! Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Jun 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Development

Successfully merging this pull request may close these issues.

FileSystemEntry.Attributes property is not correct on Unix
5 participants