Preliminary usage graph

This commit is contained in:
Andrea Mazzoleni 2016-01-26 23:25:01 +01:00
parent 3e2420489a
commit 846c02e2c1
7 changed files with 217 additions and 45 deletions

View file

@ -31,6 +31,11 @@
/****************************************************************************/
/* snapraid */
/**
* Number of measures of the operation progress.
*/
#define PROGRESS_MAX 100
/**
* Max UUID length.
*/
@ -328,10 +333,12 @@ struct snapraid_disk {
char uuid[UUID_MAX]; /**< UUID of the disk. */
uint64_t device; /**< Device identifier. */
uint64_t tick; /**< Usage time of the disk. */
block_off_t total_blocks; /**< Number of total blocks. */
block_off_t free_blocks; /**< Number of free blocks at the last sync. */
uint64_t tick; /**< Usage time. */
uint64_t progress_tick[PROGRESS_MAX]; /**< Last ticks of progress. */
/**
* First free searching block.
* Note that it doesn't necessarily point at the first free block,
@ -423,10 +430,8 @@ struct snapraid_parity {
int skip_access; /**< If the disk is inaccessible and it should be skipped. */
int is_excluded; /**< If the parity is excluded by disk filter. */
/**
* Cumulative time used for parity disks.
*/
uint64_t tick;
uint64_t tick; /**< Usage time. */
uint64_t progress_tick[PROGRESS_MAX]; /**< Last cpu ticks of progress. */
};
/**