Files
openide/platform/core-nio-fs/intellij.platform.core.nio.fs.tests.iml
Vladimir Lagunov 72112d530c IJPL-161957 IJent: fix multiple bugs in backend choosing inside MultiRoutingFileSystem
* The path in `getBackend` can contain different slashes as separators.
* The path in `getBackend` is not always a root path.

The result of benchmarks before the change on i9-12900, Windows 11:

```
Benchmark                                                                                 Mode  Cnt   Score   Error  Units
MultiRoutingFileSystemBackendBenchmark.negativeMatchMatchWithoutPrefixAndWithBackslashes  avgt    5   3.917 ± 0.927  ns/op
MultiRoutingFileSystemBackendBenchmark.positiveMatchMatchWithoutPrefixAndWithBackslashes  avgt    5  31.501 ± 2.661  ns/op
````

The result after the change on the same machine:

```
Benchmark                                                                                               Mode  Cnt   Score    Error  Units
MultiRoutingFileSystemBackendBenchmark.negativeMatchMatchWithoutPrefixAndWithBackslashes                avgt    5   3.736 ±  0.229  ns/op
MultiRoutingFileSystemBackendBenchmark.positiveMatchMatchWithoutPrefixAndWithBackslashes                avgt    5  49.046 ± 47.483  ns/op
MultiRoutingFileSystemBackendBenchmark.positiveMatchMatchWithoutPrefixAndWithBackslashesAndLongPath     avgt    5  49.051 ± 47.616  ns/op
MultiRoutingFileSystemBackendBenchmark.positiveMatchMatchWithoutPrefixAndWithRegularSlashes             avgt    5  47.105 ± 46.558  ns/op
MultiRoutingFileSystemBackendBenchmark.positiveMatchMatchWithoutPrefixAndWithRegularSlashesAndLongPath  avgt    5  47.055 ± 46.209  ns/op
```

The method became slower, but it still takes less than 100 nanoseconds.

GitOrigin-RevId: e00219ff8bee3b26b5d5963714fe116d637874dc
2024-09-16 17:45:00 +00:00

20 lines
1.1 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$/test">
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="intellij.platform.core.nio.fs" />
<orderEntry type="module" module-name="intellij.platform.util" />
<orderEntry type="library" scope="TEST" name="io.mockk" level="project" />
<orderEntry type="library" scope="TEST" name="io.mockk.jvm" level="project" />
<orderEntry type="library" scope="TEST" name="JUnit5" level="project" />
<orderEntry type="library" scope="TEST" name="kotlin-reflect" level="project" />
<orderEntry type="library" scope="TEST" name="kotlin-stdlib" level="project" />
<orderEntry type="library" scope="TEST" name="kotlin-test-assertions-core-jvm" level="project" />
<orderEntry type="library" scope="TEST" name="mockito" level="project" />
</component>
</module>