@Override public String getBytesRead() { return IOUtils.humanReadableByteCount(totalBytesRead); }
@Override public String getDownloadSize() { return humanReadableByteCount(downloadSize.get()); }
@Override public String getUploadSize() { return humanReadableByteCount(uploadSize.get()); }
@Override public String getCopyInProgressSize() { return humanReadableByteCount(copyInProgressSize.get()); }
@Override public String getUploadSize() { return humanReadableByteCount(uploadSize.get()); }
@Override public String getGarbageCollectedSize() { return humanReadableByteCount(garbageCollectedSize.get()); }
@Override public String toString() { return String.format(" %d (Time Taken %s, Bytes Read %s, Extracted text size %s)", count, timeInWords(totalTime), humanReadableByteCount(totalBytesRead), humanReadableByteCount(totalTextLength)); }
public String deleteLog(){ return String.format("%s (%s, %d attempts, %d s)", name, humanReadableByteCount(size), deleteAttemptCount, timeTaken()); }
@Override public String getGarbageSize() { long garbageSize = 0; for (LocalIndexFile failedToDeleteFile : failedToDeleteFiles.values()){ garbageSize += failedToDeleteFile.getSize(); } return humanReadableByteCount(garbageSize); }
@Override public String getLocalIndexSize() { return humanReadableByteCount(indexRootDirectory.getSize()); }
public String copyLog(){ return String.format("%s (%s, %1.1f%%, %s, %d s)", name, humanReadableByteCount(actualSize()), copyProgress(), humanReadableByteCount(size), timeTaken()); }
@Override public String fileStoreInfoAsString() { return String.format("Segment store size : %s%n" + "Number of tar files : %d", IOUtils.humanReadableByteCount(getApproximateSize()), getTarFileCount()); }
@Override public String blobStoreInfoAsString() { return String.format("Uploads - size = %s, count = %d%nDownloads - size = %s, count = %d", humanReadableByteCount(getUploadTotalSize()), getUploadCount(), humanReadableByteCount(getDownloadTotalSize()), getDownloadCount() ); }
@Override public String blobStoreInfoAsString() { return String.format("Uploads - size = %s, count = %d%nDownloads - size = %s, count = %d", humanReadableByteCount(getUploadTotalSize()), getUploadCount(), humanReadableByteCount(getDownloadTotalSize()), getDownloadCount() ); }
@Override public String blobStoreInfoAsString() { return String.format("Uploads - size = %s, count = %d%nDownloads - size = %s, count = %d", humanReadableByteCount(getUploadTotalSize()), getUploadCount(), humanReadableByteCount(getDownloadTotalSize()), getDownloadCount() ); }
private CompositeDataSupport toCompositeData(GarbageCollectionRepoStats statObj) throws OpenDataException { Object[] values = new Object[] { statObj.getRepositoryId() + (statObj.isLocal() ? " *" : ""), (statObj.getStartTime() == 0 ? "" : (new Date(statObj.getStartTime()))).toString(), (statObj.getEndTime() == 0 ? "" : (new Date(statObj.getEndTime()))).toString(), statObj.getLength(), humanReadableByteCount(statObj.getLength()), statObj.getNumLines() }; return new CompositeDataSupport(TYPE, FIELD_NAMES, values); }
private CompositeDataSupport toCompositeData(GarbageCollectionRepoStats statObj) throws OpenDataException { Object[] values = new Object[] { statObj.getRepositoryId() + (statObj.isLocal() ? " *" : ""), (statObj.getStartTime() == 0 ? "" : (new Date(statObj.getStartTime()))).toString(), (statObj.getEndTime() == 0 ? "" : (new Date(statObj.getEndTime()))).toString(), statObj.getLength(), humanReadableByteCount(statObj.getLength()), statObj.getNumLines() }; return new CompositeDataSupport(MARK_TYPE, MARK_FIELD_NAMES, values); }
private CompositeDataSupport toCompositeData(GarbageCollectionRepoStats statObj) throws OpenDataException { Object[] values = new Object[] { statObj.getRepositoryId() + (statObj.isLocal() ? " *" : ""), (statObj.getStartTime() == 0 ? "" : (new Date(statObj.getStartTime()))).toString(), (statObj.getEndTime() == 0 ? "" : (new Date(statObj.getEndTime()))).toString(), statObj.getLength(), humanReadableByteCount(statObj.getLength()), statObj.getNumLines() }; return new CompositeDataSupport(MARK_TYPE, MARK_FIELD_NAMES, values); }
public IndexStats(String path, LuceneIndexNode indexNode) throws IOException { this.path = path; numDocs = indexNode.getSearcher().getIndexReader().numDocs(); maxDoc = indexNode.getSearcher().getIndexReader().maxDoc(); numDeletedDocs = indexNode.getSearcher().getIndexReader().numDeletedDocs(); indexSize = getIndexSize(indexNode.getPrimaryReaders()); indexSizeStr = humanReadableByteCount(indexSize); suggesterSize = dirSize(indexNode.getSuggestDirectory()); suggesterSizeStr = humanReadableByteCount(suggesterSize); nrtIndexSize = getIndexSize(indexNode.getNRTReaders()); numDocsNRT = getNumDocs(indexNode.getNRTReaders()); nrtIndexSizeStr = humanReadableByteCount(nrtIndexSize); }
private void printStats() throws IOException { fileStore.flush(); FileStoreStats stats = fileStore.getStats(); long sizeOfDirectory = FileUtils.sizeOfDirectory(new File(fdsDir)); String fdsSize = (sizeOfDirectory / (1024 * 1000)) + " MB"; double time = evaluateQuery(FOO_QUERY); System.err.println("||codec||min record length||merge policy||segment size||FDS size||query time||"); System.err.println("|" + codec + "|" + minRecordLength + "|" + mergePolicy + "|" + IOUtils.humanReadableByteCount( stats.getApproximateSize()) + "|" + fdsSize + "|" + time + " s|"); if (indexOnFS) { long sizeOfFSIndex = FileUtils.sizeOfDirectory(new File(indexPath)); System.out.println("Index on FS size : " + FileUtils.byteCountToDisplaySize(sizeOfFSIndex)); } }