Fix statistics

This commit is contained in:
Andrea Cavalli 2024-09-19 22:14:44 +02:00
parent 52863bf498
commit ce356e3c33
2 changed files with 5 additions and 47 deletions

42
pom.xml
View File

@ -436,48 +436,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>attach-sources</id>
<phase>deploy</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.8.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<phase>deploy</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.2</version>
<executions>
<execution>
<id>deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>

View File

@ -781,7 +781,7 @@ public class LLLocalKeyValueDatabase extends Backuppable implements LLKeyValueDa
if (closed) {
return 0d;
}
return database.getAggregatedLongProperty(propertyName) / (double) handles.size();
return database.getAggregatedLongProperty(propertyName);
} catch (RocksDBException e) {
if ("NotFound".equals(e.getMessage())) {
return 0d;
@ -1344,10 +1344,10 @@ public class LLLocalKeyValueDatabase extends Backuppable implements LLKeyValueDa
db.getAggregatedLongProperty(RocksDBLongProperty.SIZE_ALL_MEM_TABLES.getName()),
db.getAggregatedLongProperty(RocksDBLongProperty.CUR_SIZE_ALL_MEM_TABLES.getName()),
db.getAggregatedLongProperty(RocksDBLongProperty.ESTIMATE_NUM_KEYS.getName()),
db.getAggregatedLongProperty(RocksDBLongProperty.BLOCK_CACHE_CAPACITY.getName()) / this.handles.size(),
db.getAggregatedLongProperty(RocksDBLongProperty.BLOCK_CACHE_USAGE.getName()) / this.handles.size(),
db.getAggregatedLongProperty(RocksDBLongProperty.BLOCK_CACHE_PINNED_USAGE.getName()) / this.handles.size(),
db.getAggregatedLongProperty(RocksDBLongProperty.NUM_LIVE_VERSIONS.getName()) / this.handles.size()
db.getAggregatedLongProperty(RocksDBLongProperty.BLOCK_CACHE_CAPACITY.getName()),
db.getAggregatedLongProperty(RocksDBLongProperty.BLOCK_CACHE_USAGE.getName()),
db.getAggregatedLongProperty(RocksDBLongProperty.BLOCK_CACHE_PINNED_USAGE.getName()),
db.getAggregatedLongProperty(RocksDBLongProperty.NUM_LIVE_VERSIONS.getName())
);
} catch (RocksDBException e) {
throw new DBException("Failed to read memory stats", e);