Disk ARchive 2.7.16
Full featured and portable backup and archiving tool
|
class used by libdar::archive class to give a summary of treated file during and after an operation More...
#include <statistics.hpp>
Public Member Functions | |
statistics (bool lock=true) | |
constructor More... | |
statistics (const statistics &ref) | |
copy constructor More... | |
statistics (statistics &&ref) | |
move constructor More... | |
statistics & | operator= (const statistics &ref) |
copy assignement More... | |
statistics & | operator= (statistics &&ref) noexcept |
move assignement More... | |
~statistics () | |
destructor More... | |
void | clear () |
reset counters to zero | |
infinint | total () const |
total number of file treated | |
void | incr_treated () |
increment by one the treated counter More... | |
void | incr_hard_links () |
increment by one the hard_links counter More... | |
void | incr_skipped () |
increment by one the skipped counter More... | |
void | incr_inode_only () |
increment by one the inode_only counter More... | |
void | incr_ignored () |
increment by one the ignored counter More... | |
void | incr_tooold () |
increment by one the tooold counter More... | |
void | incr_errored () |
increment by one the errored counter More... | |
void | incr_deleted () |
increment by one the deleted counter More... | |
void | incr_ea_treated () |
increment by one the ea_treated counter More... | |
void | incr_fsa_treated () |
increment by one the fsa treated counter More... | |
void | add_to_ignored (const infinint &val) |
increment the ignored counter by a given value More... | |
void | add_to_errored (const infinint &val) |
increment the errored counter by a given value More... | |
void | add_to_deleted (const infinint &val) |
increment the deleted counter by a given value More... | |
void | add_to_byte_amount (const infinint &val) |
increment the byte amount counter by a given value More... | |
void | sub_from_treated (const infinint &val) |
substract value from the treated counter More... | |
void | sub_from_ea_treated (const infinint &val) |
substract value to the ea_treated counter More... | |
void | sub_from_hard_links (const infinint &val) |
substract value to the hard_links counter More... | |
void | sub_from_fsa_treated (const infinint &val) |
substract value to the fsa_treated counter More... | |
infinint | get_treated () const |
returns the current value of the treated counter More... | |
infinint | get_hard_links () const |
returns the current value of the hard_links counter More... | |
infinint | get_skipped () const |
returns the current value of the skipped counter More... | |
infinint | get_inode_only () const |
returns the current value of the inode_only counter More... | |
infinint | get_ignored () const |
returns the current value of the ignored counter More... | |
infinint | get_tooold () const |
returns the current value of the tooold counter More... | |
infinint | get_errored () const |
returns the current value of the errored counter More... | |
infinint | get_deleted () const |
returns the current value of the deleted counter More... | |
infinint | get_ea_treated () const |
returns the current value of the ea_treated counter More... | |
infinint | get_byte_amount () const |
returns the current value of the byte_amount counter More... | |
infinint | get_fsa_treated () const |
returns the current value of the fsa_treated counter More... | |
std::string | get_treated_str () const |
returns the current value of the treated counter as a std::string More... | |
std::string | get_hard_links_str () const |
returns the current value of the hard_links counter as a std::string; More... | |
std::string | get_skipped_str () const |
returns the current value of the skipped counter as a std::string More... | |
std::string | get_inode_only_str () const |
returns the current value of the inode_only counter as a std::string More... | |
std::string | get_ignored_str () const |
returns the current value of the ignored counter as a std::string More... | |
std::string | get_tooold_str () const |
returns the current value of the tooold counter as a std::string More... | |
std::string | get_errored_str () const |
returns the current value of the errored counter as a std::string More... | |
std::string | get_deleted_str () const |
returns the current value of the deleted counter as a std::string More... | |
std::string | get_ea_treated_str () const |
returns the current value of the ea_treated counter as a std::string More... | |
std::string | get_byte_amount_str () const |
returns the current value of the byte_amount counter as a std::string More... | |
std::string | get_fsa_treated_str () const |
returns the current value of the fsa_treated counter as a std::string More... | |
void | decr_treated () |
decrement by one the treated counter More... | |
void | decr_hard_links () |
decrement by one the hard_links counter More... | |
void | decr_skipped () |
decrement by one the skipped counter More... | |
void | decr_inode_only () |
decrement by one the inode_only counter More... | |
void | decr_ignored () |
decrement by one the ignored counter More... | |
void | decr_tooold () |
decrement by one the toold counter More... | |
void | decr_errored () |
decrement by one the errored counter More... | |
void | decr_deleted () |
decrement by one the deleted counter More... | |
void | decr_ea_treated () |
decrement by one the ea_treated counter More... | |
void | decr_fsa_treated () |
decrement by one the fsa_treated counter More... | |
void | set_byte_amount (const infinint &val) |
set to the given value the byte_amount counter More... | |
void | dump (user_interaction &dialog) const |
debuging method | |
Private Member Functions | |
void | increment_locked (infinint *var) |
void | increment_unlocked (infinint *var) |
void | add_to_locked (infinint *var, const infinint &val) |
void | add_to_unlocked (infinint *var, const infinint &val) |
infinint | returned_locked (const infinint *var) const |
infinint | returned_unlocked (const infinint *var) const |
void | decrement_locked (infinint *var) |
void | decrement_unlocked (infinint *var) |
void | set_to_locked (infinint *var, const infinint &val) |
void | set_to_unlocked (infinint *var, const infinint &val) |
void | sub_from_unlocked (infinint *var, const infinint &val) |
void | sub_from_locked (infinint *var, const infinint &val) |
void | init (bool lock) |
set locking & mutex | |
void | detruit () |
release and free the mutex | |
void | copy_from (const statistics &ref) |
reset mutex and copy data from the object of reference | |
void | move_from (statistics &&ref) noexcept |
used by to implement move related operations | |
Private Attributes | |
bool | locking |
whether we use locking or not More... | |
infinint | treated |
number of inode treated (saved, restored, etc.) [all operations] More... | |
infinint | hard_links |
number of hard linked inodes treated (including those ignored by filters) More... | |
infinint | skipped |
files not changed since last backup / file not restored because not saved in backup More... | |
infinint | inode_only |
files which operation only affected inode metadata not its data More... | |
infinint | ignored |
ignored files due to filters More... | |
infinint | tooold |
ignored files because less recent than the filesystem entry [restoration] / modfied during backup More... | |
infinint | errored |
files that could not be saved / files that could not be restored (filesystem access right) More... | |
infinint | deleted |
deleted file seen / number of files deleted during the operation [restoration] More... | |
infinint | ea_treated |
number of EA saved / number of EA restored More... | |
infinint | byte_amount |
auxilliary counter, holds the wasted bytes due to repeat on change feature for example. More... | |
infinint | fsa_treated |
number of FSA saved / number of FSA restored More... | |
void(statistics::* | increment )(infinint *var) |
generic method for incrementing a variable More... | |
void(statistics::* | add_to )(infinint *var, const infinint &val) |
generic method for add a value to a variable More... | |
infinint(statistics::* | returned )(const infinint *var) const |
generic method for obtaining the value of a variable More... | |
void(statistics::* | decrement )(infinint *var) |
generic method for decrementing a variable More... | |
void(statistics::* | set_to )(infinint *var, const infinint &val) |
generic method for setting a variable to a given value More... | |
void(statistics::* | sub_from )(infinint *var, const infinint &val) |
generic method for substracting to a variable More... | |
class used by libdar::archive class to give a summary of treated file during and after an operation
the different fields are used for backup, restoration and other operation their meaning changes a bit depending on the operation. Some operation may not use all fields. To have a detailed view of what fields get used and what are their meaning see the archive class constructor and methods documentation
Definition at line 69 of file statistics.hpp.
|
inline |
constructor
[in] | lock | whether to use mutex to manipulate (read or write) variables of that object |
Definition at line 79 of file statistics.hpp.
|
inline |
|
inline |
|
inline |
|
inline |
increment the byte amount counter by a given value
Definition at line 142 of file statistics.hpp.
References add_to, and byte_amount.
|
inline |
increment the deleted counter by a given value
Definition at line 139 of file statistics.hpp.
|
inline |
increment the errored counter by a given value
Definition at line 136 of file statistics.hpp.
|
inline |
increment the ignored counter by a given value
Definition at line 133 of file statistics.hpp.
Definition at line 316 of file statistics.hpp.
Definition at line 323 of file statistics.hpp.
|
inline |
decrement by one the deleted counter
Definition at line 251 of file statistics.hpp.
|
inline |
decrement by one the ea_treated counter
Definition at line 254 of file statistics.hpp.
References decrement, and ea_treated.
|
inline |
decrement by one the errored counter
Definition at line 248 of file statistics.hpp.
|
inline |
decrement by one the fsa_treated counter
Definition at line 257 of file statistics.hpp.
References decrement, and fsa_treated.
|
inline |
decrement by one the hard_links counter
Definition at line 233 of file statistics.hpp.
References decrement, and hard_links.
|
inline |
decrement by one the ignored counter
Definition at line 242 of file statistics.hpp.
|
inline |
decrement by one the inode_only counter
Definition at line 239 of file statistics.hpp.
References decrement, and inode_only.
|
inline |
decrement by one the skipped counter
Definition at line 236 of file statistics.hpp.
|
inline |
decrement by one the toold counter
Definition at line 245 of file statistics.hpp.
|
inline |
decrement by one the treated counter
Definition at line 230 of file statistics.hpp.
|
inlineprivate |
Definition at line 344 of file statistics.hpp.
|
inlineprivate |
Definition at line 351 of file statistics.hpp.
|
inline |
returns the current value of the byte_amount counter
Definition at line 187 of file statistics.hpp.
References byte_amount, and returned.
Referenced by get_byte_amount_str().
|
inline |
returns the current value of the byte_amount counter as a std::string
Definition at line 223 of file statistics.hpp.
References get_byte_amount(), and libdar::deci::human().
|
inline |
returns the current value of the deleted counter
Definition at line 181 of file statistics.hpp.
References deleted, and returned.
Referenced by get_deleted_str().
|
inline |
returns the current value of the deleted counter as a std::string
Definition at line 217 of file statistics.hpp.
References get_deleted(), and libdar::deci::human().
|
inline |
returns the current value of the ea_treated counter
Definition at line 184 of file statistics.hpp.
References ea_treated, and returned.
Referenced by get_ea_treated_str().
|
inline |
returns the current value of the ea_treated counter as a std::string
Definition at line 220 of file statistics.hpp.
References get_ea_treated(), and libdar::deci::human().
|
inline |
returns the current value of the errored counter
Definition at line 178 of file statistics.hpp.
References errored, and returned.
Referenced by get_errored_str().
|
inline |
returns the current value of the errored counter as a std::string
Definition at line 214 of file statistics.hpp.
References get_errored(), and libdar::deci::human().
|
inline |
returns the current value of the fsa_treated counter
Definition at line 190 of file statistics.hpp.
References fsa_treated, and returned.
Referenced by get_fsa_treated_str().
|
inline |
returns the current value of the fsa_treated counter as a std::string
Definition at line 226 of file statistics.hpp.
References get_fsa_treated(), and libdar::deci::human().
|
inline |
returns the current value of the hard_links counter
Definition at line 163 of file statistics.hpp.
References hard_links, and returned.
Referenced by get_hard_links_str().
|
inline |
returns the current value of the hard_links counter as a std::string;
Definition at line 199 of file statistics.hpp.
References get_hard_links(), and libdar::deci::human().
|
inline |
returns the current value of the ignored counter
Definition at line 172 of file statistics.hpp.
References ignored, and returned.
Referenced by get_ignored_str().
|
inline |
returns the current value of the ignored counter as a std::string
Definition at line 208 of file statistics.hpp.
References get_ignored(), and libdar::deci::human().
|
inline |
returns the current value of the inode_only counter
Definition at line 169 of file statistics.hpp.
References inode_only, and returned.
Referenced by get_inode_only_str().
|
inline |
returns the current value of the inode_only counter as a std::string
Definition at line 205 of file statistics.hpp.
References get_inode_only(), and libdar::deci::human().
|
inline |
returns the current value of the skipped counter
Definition at line 166 of file statistics.hpp.
References returned, and skipped.
Referenced by get_skipped_str().
|
inline |
returns the current value of the skipped counter as a std::string
Definition at line 202 of file statistics.hpp.
References get_skipped(), and libdar::deci::human().
|
inline |
returns the current value of the tooold counter
Definition at line 175 of file statistics.hpp.
References returned, and tooold.
Referenced by get_tooold_str().
|
inline |
returns the current value of the tooold counter as a std::string
Definition at line 211 of file statistics.hpp.
References get_tooold(), and libdar::deci::human().
|
inline |
returns the current value of the treated counter
Definition at line 160 of file statistics.hpp.
References returned, and treated.
Referenced by get_treated_str().
|
inline |
returns the current value of the treated counter as a std::string
Definition at line 196 of file statistics.hpp.
References get_treated(), and libdar::deci::human().
|
inline |
increment by one the deleted counter
Definition at line 124 of file statistics.hpp.
|
inline |
increment by one the ea_treated counter
Definition at line 127 of file statistics.hpp.
References ea_treated, and increment.
|
inline |
increment by one the errored counter
Definition at line 121 of file statistics.hpp.
|
inline |
increment by one the fsa treated counter
Definition at line 130 of file statistics.hpp.
References fsa_treated, and increment.
|
inline |
increment by one the hard_links counter
Definition at line 106 of file statistics.hpp.
References hard_links, and increment.
|
inline |
increment by one the ignored counter
Definition at line 115 of file statistics.hpp.
|
inline |
increment by one the inode_only counter
Definition at line 112 of file statistics.hpp.
References increment, and inode_only.
|
inline |
increment by one the skipped counter
Definition at line 109 of file statistics.hpp.
|
inline |
increment by one the tooold counter
Definition at line 118 of file statistics.hpp.
|
inline |
increment by one the treated counter
Definition at line 103 of file statistics.hpp.
|
inlineprivate |
Definition at line 304 of file statistics.hpp.
|
inlineprivate |
Definition at line 311 of file statistics.hpp.
|
inline |
copy assignement
Definition at line 88 of file statistics.hpp.
References copy_from(), and detruit().
|
inlinenoexcept |
Definition at line 328 of file statistics.hpp.
Definition at line 339 of file statistics.hpp.
|
inline |
set to the given value the byte_amount counter
Definition at line 260 of file statistics.hpp.
References byte_amount, and set_to.
Definition at line 356 of file statistics.hpp.
Definition at line 363 of file statistics.hpp.
|
inline |
substract value to the ea_treated counter
Definition at line 148 of file statistics.hpp.
References ea_treated, and sub_from.
|
inline |
substract value to the fsa_treated counter
Definition at line 154 of file statistics.hpp.
References fsa_treated, and sub_from.
|
inline |
substract value to the hard_links counter
Definition at line 151 of file statistics.hpp.
References hard_links, and sub_from.
Definition at line 373 of file statistics.hpp.
|
inline |
substract value from the treated counter
Definition at line 145 of file statistics.hpp.
Definition at line 368 of file statistics.hpp.
generic method for add a value to a variable
Definition at line 298 of file statistics.hpp.
Referenced by add_to_byte_amount(), add_to_deleted(), add_to_errored(), and add_to_ignored().
|
private |
auxilliary counter, holds the wasted bytes due to repeat on change feature for example.
Definition at line 292 of file statistics.hpp.
Referenced by add_to_byte_amount(), get_byte_amount(), and set_byte_amount().
|
private |
generic method for decrementing a variable
Definition at line 300 of file statistics.hpp.
Referenced by decr_deleted(), decr_ea_treated(), decr_errored(), decr_fsa_treated(), decr_hard_links(), decr_ignored(), decr_inode_only(), decr_skipped(), decr_tooold(), and decr_treated().
|
private |
deleted file seen / number of files deleted during the operation [restoration]
Definition at line 288 of file statistics.hpp.
Referenced by add_to_deleted(), decr_deleted(), get_deleted(), and incr_deleted().
|
private |
number of EA saved / number of EA restored
Definition at line 290 of file statistics.hpp.
Referenced by decr_ea_treated(), get_ea_treated(), incr_ea_treated(), and sub_from_ea_treated().
|
private |
files that could not be saved / files that could not be restored (filesystem access right)
Definition at line 286 of file statistics.hpp.
Referenced by add_to_errored(), decr_errored(), get_errored(), and incr_errored().
|
private |
number of FSA saved / number of FSA restored
Definition at line 294 of file statistics.hpp.
Referenced by decr_fsa_treated(), get_fsa_treated(), incr_fsa_treated(), and sub_from_fsa_treated().
|
private |
number of hard linked inodes treated (including those ignored by filters)
Definition at line 276 of file statistics.hpp.
Referenced by decr_hard_links(), get_hard_links(), incr_hard_links(), and sub_from_hard_links().
|
private |
ignored files due to filters
Definition at line 282 of file statistics.hpp.
Referenced by add_to_ignored(), decr_ignored(), get_ignored(), and incr_ignored().
|
private |
generic method for incrementing a variable
Definition at line 297 of file statistics.hpp.
Referenced by incr_deleted(), incr_ea_treated(), incr_errored(), incr_fsa_treated(), incr_hard_links(), incr_ignored(), incr_inode_only(), incr_skipped(), incr_tooold(), and incr_treated().
|
private |
files which operation only affected inode metadata not its data
Definition at line 280 of file statistics.hpp.
Referenced by decr_inode_only(), get_inode_only(), and incr_inode_only().
|
private |
whether we use locking or not
Definition at line 271 of file statistics.hpp.
generic method for obtaining the value of a variable
Definition at line 299 of file statistics.hpp.
Referenced by get_byte_amount(), get_deleted(), get_ea_treated(), get_errored(), get_fsa_treated(), get_hard_links(), get_ignored(), get_inode_only(), get_skipped(), get_tooold(), and get_treated().
generic method for setting a variable to a given value
Definition at line 301 of file statistics.hpp.
Referenced by set_byte_amount().
|
private |
files not changed since last backup / file not restored because not saved in backup
Definition at line 278 of file statistics.hpp.
Referenced by decr_skipped(), get_skipped(), and incr_skipped().
generic method for substracting to a variable
Definition at line 302 of file statistics.hpp.
Referenced by sub_from_ea_treated(), sub_from_fsa_treated(), sub_from_hard_links(), and sub_from_treated().
|
private |
ignored files because less recent than the filesystem entry [restoration] / modfied during backup
Definition at line 284 of file statistics.hpp.
Referenced by decr_tooold(), get_tooold(), and incr_tooold().
|
private |
number of inode treated (saved, restored, etc.) [all operations]
Definition at line 274 of file statistics.hpp.
Referenced by decr_treated(), get_treated(), incr_treated(), and sub_from_treated().