export_output_stats.cpp 679 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. This file is part of Telegram Desktop,
  3. the official desktop application for the Telegram messaging service.
  4. For license and copyright information please follow this link:
  5. https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
  6. */
  7. #include "export/output/export_output_stats.h"
  8. namespace Export {
  9. namespace Output {
  10. Stats::Stats(const Stats &other)
  11. : _files(other._files.load())
  12. , _bytes(other._bytes.load()) {
  13. }
  14. void Stats::incrementFiles() {
  15. ++_files;
  16. }
  17. void Stats::incrementBytes(int count) {
  18. _bytes += count;
  19. }
  20. int Stats::filesCount() const {
  21. return _files;
  22. }
  23. int64 Stats::bytesCount() const {
  24. return _bytes;
  25. }
  26. } // namespace Output
  27. } // namespace Export