cryptofs icon indicating copy to clipboard operation
cryptofs copied to clipboard

Include stats for metadata accesses

Open BeyerMart opened this issue 3 years ago • 3 comments
trafficstars

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

BeyerMart avatar May 05 '22 09:05 BeyerMart

@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 🙈

overheadhunter avatar May 05 '22 13:05 overheadhunter

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.

tobihagemann avatar May 05 '22 14:05 tobihagemann