提交 4307ec5b authored 作者: Thomas Mueller's avatar Thomas Mueller

An archive tool that uses compression and de-duplication (compresses better than…

An archive tool that uses compression and de-duplication (compresses better than 7zip / pkzip for large directories in many cases)
上级 5832f043
...@@ -346,7 +346,7 @@ public class FileStore { ...@@ -346,7 +346,7 @@ public class FileStore {
return freeSpace.getFillRate(); return freeSpace.getFillRate();
} }
public long getFirstFree() { long getFirstFree() {
return freeSpace.getFirstFree(); return freeSpace.getFirstFree();
} }
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
package org.h2.table; package org.h2.table;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.io.Reader; import java.io.Reader;
import java.sql.DatabaseMetaData; import java.sql.DatabaseMetaData;
...@@ -958,6 +959,18 @@ public class MetaTable extends Table { ...@@ -958,6 +959,18 @@ public class MetaTable extends Table {
fs.getWriteCount()); fs.getWriteCount());
add(rows, "info.FILE_READ", "" + add(rows, "info.FILE_READ", "" +
fs.getReadCount()); fs.getReadCount());
long size;
try {
size = fs.getFile().size();
} catch (IOException e) {
throw DbException.convertIOException(e, "Can not get size");
}
int pageSize = 4 * 1024;
long pageCount = size / pageSize;
add(rows, "info.PAGE_COUNT", "" +
pageCount);
add(rows, "info.PAGE_SIZE", "" +
pageSize);
add(rows, "info.CACHE_MAX_SIZE", "" + add(rows, "info.CACHE_MAX_SIZE", "" +
mvStore.getStore().getCacheSize()); mvStore.getStore().getCacheSize());
add(rows, "info.CACHE_SIZE", "" + add(rows, "info.CACHE_SIZE", "" +
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论