EventIndexPanel: Get more stats for our indexer, not just the size.

This commit is contained in:
Damir Jelić 2020-01-20 17:42:24 +01:00
parent 695b8aff5b
commit 1b9b30d4ea
4 changed files with 74 additions and 24 deletions

View file

@ -67,6 +67,12 @@ export interface HistoricEvent {
profile: MatrixProfile;
}
export interface IndexStats {
size: number;
event_count: number;
room_count: number;
}
/**
* Base class for classes that provide platform-specific event indexing.
*
@ -118,9 +124,12 @@ export default class BaseEventIndexManager {
}
/**
* Get the disk usage of the index
* Get statistical information of the index.
*
* @return {Promise<IndexStats>} A promise that will resolve to the index
* statistics.
*/
async indexSize(): Promise<number> {
async getStats(): Promise<IndexStats> {
throw new Error("Unimplemented");
}