mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-08-21 06:36:01 +00:00
Using new methods from CryptoFs to get correct statistics
This commit is contained in:
@@ -43,8 +43,8 @@ public class VaultStatisticsController implements FxController {
|
||||
private final LongBinding totalBytesWritten;
|
||||
private final LongBinding totalBytesEncrypted;
|
||||
private final LongBinding totalBytesDecrypted;
|
||||
/*private final IntegerBinding filesRead;
|
||||
private final IntegerBinding filesWritten;*/
|
||||
private final LongBinding filesRead;
|
||||
private final LongBinding filesWritten;
|
||||
private final LongBinding bpsEncrypted;
|
||||
private final LongBinding bpsDecrypted;
|
||||
|
||||
@@ -69,8 +69,8 @@ public class VaultStatisticsController implements FxController {
|
||||
this.totalBytesWritten = WeakBindings.bindLong(stats.toalBytesWrittenProperty());
|
||||
this.totalBytesDecrypted = WeakBindings.bindLong(stats.totalBytesDecryptedProperty());
|
||||
this.totalBytesEncrypted = WeakBindings.bindLong(stats.totalBytesEncryptedProperty());
|
||||
/*this.filesRead = WeakBindings.bindInterger();
|
||||
this.filesWritten = WeakBindings.bindInterger();*/
|
||||
this.filesRead = WeakBindings.bindLong(stats.filesRead());
|
||||
this.filesWritten = WeakBindings.bindLong(stats.filesWritten());
|
||||
this.bpsEncrypted = WeakBindings.bindLong(stats.bytesPerSecondEncryptedProperty());
|
||||
this.bpsDecrypted = WeakBindings.bindLong(stats.bytesPerSecondDecryptedProperty());
|
||||
|
||||
@@ -202,4 +202,12 @@ public class VaultStatisticsController implements FxController {
|
||||
public long getBpsDecrypted() {
|
||||
return bpsDecrypted.get();
|
||||
}
|
||||
|
||||
public LongBinding filesReadProperty() { return filesRead;}
|
||||
|
||||
public long getFilesRead() { return filesRead.get();}
|
||||
|
||||
public LongBinding filesWrittenProperty() {return filesWritten;}
|
||||
|
||||
public long getFilesWritten() {return filesWritten.get();}
|
||||
}
|
||||
|
||||
@@ -61,15 +61,13 @@
|
||||
</HBox>
|
||||
<HBox alignment="CENTER">
|
||||
<Label styleClass="label-large" text="%stats.totalMiBDecrypted"/>
|
||||
<DataLabel styleClass="label-large" alignment="CENTER_RIGHT" minWidth="60" byteFormat="%stats.data.bytes" kibFormat="%stats.data.kiB" mibFormat="%stats.data.miB" gibFormat="%stats.data.giB"
|
||||
<DataLabel styleClass="label-large" alignment="CENTER_RIGHT" minWidth="60" byteFormat="%stats.data.bytes" kibFormat="%stats.data.kiB" mibFormat="%stats.data.miB" gibFormat="%stats.data.giB"
|
||||
dataInBytes="${controller.totalBytesDecrypted}"/>
|
||||
</HBox>
|
||||
<FormattedLabel styleClass="label-large" alignment="CENTER_RIGHT" minWidth="60" format="%stats.totalReads" arg1="${controller.filesRead}"/>
|
||||
|
||||
<!--
|
||||
<FormattedLabel styleClass="label-large" alignment="CENTER_RIGHT" minWidth="60" format="%stats.totalMiBRead" arg1="${controller.totalBytesRead}"/>
|
||||
<FormattedLabel styleClass="label-large" alignment="CENTER_RIGHT" minWidth="60" format="%stats.totalMiBDecrypted" arg1="${controller.totalBytesDecrypted}"/>
|
||||
-->
|
||||
</VBox>
|
||||
|
||||
</VBox>
|
||||
|
||||
<!-- Write -->
|
||||
@@ -101,6 +99,8 @@
|
||||
<DataLabel styleClass="label-large" alignment="CENTER_RIGHT" minWidth="60" byteFormat="%stats.data.bytes" kibFormat="%stats.data.kiB" mibFormat="%stats.data.miB" gibFormat="%stats.data.giB"
|
||||
dataInBytes="${controller.totalBytesEncrypted}"/>
|
||||
</HBox>
|
||||
<FormattedLabel styleClass="label-large" alignment="CENTER_RIGHT" minWidth="60" format="%stats.totalWrites" arg1="${controller.filesWritten}"/>
|
||||
|
||||
</VBox>
|
||||
|
||||
</VBox>
|
||||
|
||||
@@ -169,8 +169,8 @@ stats.totalMiBRead=Total Read:
|
||||
stats.totalMiBWritten=Total Written:
|
||||
stats.totalMiBEncrypted=Total Encypted:
|
||||
stats.totalMiBDecrypted=Total Decrypted:
|
||||
stats.totalReads=Number of Reads: %s
|
||||
stats.totalWrites=Number of Writes: %s
|
||||
stats.totalReads=%s Files Read
|
||||
stats.totalWrites=%s Files Written
|
||||
stats.data.bytes=%s Bytes
|
||||
stats.data.kiB=%.1f KiB
|
||||
stats.data.miB=%.1f MiB
|
||||
|
||||
Reference in New Issue
Block a user