 |
Disk ARchive
2.6.8
Full featured and portable backup and archiving tool
|
Go to the documentation of this file.
26 #ifndef STATISTICS_HPP
27 #define STATISTICS_HPP
29 #include "../my_config.h"
46 #define LOCK_IN pthread_mutex_lock(&lock_mutex)
47 #define LOCK_OUT pthread_mutex_unlock(&lock_mutex)
48 #define LOCK_IN_CONST pthread_mutex_lock(const_cast<pthread_mutex_t *>(&lock_mutex))
49 #define LOCK_OUT_CONST pthread_mutex_unlock(const_cast<pthread_mutex_t *>(&lock_mutex))
53 #define LOCK_IN_CONST //
54 #define LOCK_OUT_CONST //
267 pthread_mutex_t lock_mutex;
304 void increment_locked(
infinint * var)
311 void increment_unlocked(
infinint * var)
316 void add_to_locked(infinint * var,
const infinint & val)
323 void add_to_unlocked(infinint *var,
const infinint & val)
328 infinint returned_locked(
const infinint * var)
const
339 infinint returned_unlocked(
const infinint * var)
const
344 void decrement_locked(infinint * var)
351 void decrement_unlocked(infinint * var)
356 void set_to_locked(infinint *var,
const infinint & val)
363 void set_to_unlocked(infinint *var,
const infinint & val)
368 void sub_from_unlocked(infinint *var,
const infinint & val)
373 void sub_from_locked(infinint *var,
const infinint & val)
381 void init(
bool lock);
infinint inode_only
files which operation only affected inode metadata not its data
infinint get_hard_links() const
returns the current value of the hard_links counter
infinint byte_amount
auxilliary counter, holds the wasted bytes due to repeat on change feature for example.
statistics(const statistics &ref)
copy constructor
void incr_skipped()
increment by one the skipped counter
std::string get_ignored_str() const
returns the current value of the ignored counter as a std::string
void(statistics::* set_to)(infinint *var, const infinint &val)
generic method for setting a variable to a given value
This is a pure virtual class that is used by libdar when interaction with the user is required.
void(statistics::* add_to)(infinint *var, const infinint &val)
generic method for add a value to a variable
void decr_fsa_treated()
decrement by one the fsa_treated counter
infinint tooold
ignored files because less recent than the filesystem entry [restoration] / modfied during backup
void add_to_deleted(const infinint &val)
increment the deleted counter by a given value
std::string get_inode_only_str() const
returns the current value of the inode_only counter as a std::string
infinint get_byte_amount() const
returns the current value of the byte_amount counter
void dump(user_interaction &dialog) const
debuging method
defines the interaction interface between libdar and users.
std::string get_tooold_str() const
returns the current value of the tooold counter as a std::string
infinint hard_links
number of hard linked inodes treated (including those ignored by filters)
void incr_ea_treated()
increment by one the ea_treated counter
statistics & operator=(const statistics &ref)
copy assignement
void add_to_byte_amount(const infinint &val)
increment the byte amount counter by a given value
switch module to limitint (32 ou 64 bits integers) or infinint
the arbitrary large positive integer class
void move_from(statistics &&ref) noexcept
used by to implement move related operations
void incr_tooold()
increment by one the tooold counter
infinint(statistics::* returned)(const infinint *var) const
generic method for obtaining the value of a variable
statistics(statistics &&ref) noexcept
move constructor
std::string get_errored_str() const
returns the current value of the errored counter as a std::string
void(statistics::* increment)(infinint *var)
generic method for incrementing a variable
void decr_ea_treated()
decrement by one the ea_treated counter
std::string get_treated_str() const
returns the current value of the treated counter as a std::string
infinint errored
files that could not be saved / files that could not be restored (filesystem access right)
infinint fsa_treated
number of FSA saved / number of FSA restored
void incr_treated()
increment by one the treated counter
void incr_errored()
increment by one the errored counter
void decr_skipped()
decrement by one the skipped counter
void decr_inode_only()
decrement by one the inode_only counter
void sub_from_fsa_treated(const infinint &val)
substract value to the fsa_treated counter
void decr_deleted()
decrement by one the deleted counter
void incr_fsa_treated()
increment by one the fsa treated counter
infinint get_ignored() const
returns the current value of the ignored counter
void detruit()
release and free the mutex
infinint get_skipped() const
returns the current value of the skipped counter
class used by libdar::archive class to give a summary of treated file during and after an operation
infinint ea_treated
number of EA saved / number of EA restored
std::string get_hard_links_str() const
returns the current value of the hard_links counter as a std::string;
infinint get_ea_treated() const
returns the current value of the ea_treated counter
decimal class, convert infinint from and to decimal represention
void incr_inode_only()
increment by one the inode_only counter
infinint deleted
deleted file seen / number of files deleted during the operation [restoration]
void(statistics::* sub_from)(infinint *var, const infinint &val)
generic method for substracting to a variable
std::string get_deleted_str() const
returns the current value of the deleted counter as a std::string
std::string get_ea_treated_str() const
returns the current value of the ea_treated counter as a std::string
void sub_from_ea_treated(const infinint &val)
substract value to the ea_treated counter
std::string human() const
this produce a string from the decimal stored in the current object
infinint ignored
ignored files due to filters
void decr_ignored()
decrement by one the ignored counter
infinint get_fsa_treated() const
returns the current value of the fsa_treated counter
void add_to_errored(const infinint &val)
increment the errored counter by a given value
void incr_deleted()
increment by one the deleted counter
void copy_from(const statistics &ref)
reset mutex and copy data from the object of reference
void(statistics::* decrement)(infinint *var)
generic method for decrementing a variable
void sub_from_hard_links(const infinint &val)
substract value to the hard_links counter
void decr_tooold()
decrement by one the toold counter
infinint get_tooold() const
returns the current value of the tooold counter
void decr_hard_links()
decrement by one the hard_links counter
void decr_treated()
decrement by one the treated counter
void add_to_ignored(const infinint &val)
increment the ignored counter by a given value
infinint get_deleted() const
returns the current value of the deleted counter
void init(bool lock)
set locking & mutex
void clear()
reset counters to zero
statistics(bool lock=true)
constructor
void sub_from_treated(const infinint &val)
substract value from the treated counter
std::string get_fsa_treated_str() const
returns the current value of the fsa_treated counter as a std::string
infinint get_errored() const
returns the current value of the errored counter
infinint treated
number of inode treated (saved, restored, etc.) [all operations]
manages the decimal representation of infinint
std::string get_skipped_str() const
returns the current value of the skipped counter as a std::string
void incr_ignored()
increment by one the ignored counter
infinint get_inode_only() const
returns the current value of the inode_only counter
std::string get_byte_amount_str() const
returns the current value of the byte_amount counter as a std::string
infinint skipped
files not changed since last backup / file not restored because not saved in backup
infinint total() const
total number of file treated
infinint get_treated() const
returns the current value of the treated counter
void incr_hard_links()
increment by one the hard_links counter
void decr_errored()
decrement by one the errored counter
bool locking
whether we use locking or not
void set_byte_amount(const infinint &val)
set to the given value the byte_amount counter
libdar namespace encapsulate all libdar symbols