cryptomator / cryptofs

Java Filesystem Provider with integrated encryption
GNU Affero General Public License v3.0
93 stars 35 forks source link

Include stats for metadata accesses #130

Closed BeyerMart closed 1 year ago

BeyerMart commented 2 years ago

With this PR, two new counters are introduced, which increment, when a FileChannel is opened and when Attributes are read.

This allows to show the total amount of accesses and also provides an option to reset the second counter, so the 'Accesses per seconds' can be displayed in Cryptomator. This feature in CryptoFs is needed for: https://github.com/cryptomator/cryptomator/issues/1511

overheadhunter commented 2 years ago

@BeyerMart Any chance you can fix the diff of CryptoFileSystemImpl.java? Maybe there is some whitespace or newline reformatting involved here? I can hardly review this line by line manually 🙈

tobihagemann commented 2 years ago

Just wanted to chime in and confirm that newlines were reformatted. :smile: 0x0a20 (old) vs. 0x0d0a20 (new). Either set your IDE to use UNIX line endings (e.g., in IntelliJ IDEA it's in the Preferences under Editor / Code Style and then "Line separator") or you can also set it globally in your git config via git config --global core.autocrlf true.

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication