GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/util/stats_utils.cpp Lines: 6 6 100.0 %
Date: 2021-03-23 Branches: 11 22 50.0 %

Line Exec Source
1
/*********************                                                        */
2
/*! \file stats_utils.cpp
3
 ** \verbatim
4
 ** Top contributors (to current version):
5
 **   Gereon Kremer
6
 ** This file is part of the CVC4 project.
7
 ** Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
8
 ** in the top-level source directory and their institutional affiliations.
9
 ** All rights reserved.  See the file COPYING in the top-level source
10
 ** directory for licensing information.\endverbatim
11
 **
12
 ** \brief Statistic utilities
13
 **
14
 ** Statistic utilities
15
 **/
16
17
#include "util/stats_utils.h"
18
19
#include <chrono>
20
#include <iomanip>
21
#include <iostream>
22
23
#include "util/ostream_util.h"
24
#include "util/stats_timer.h"
25
26
namespace CVC4 {
27
28
16
std::ostream& operator<<(std::ostream& os,
29
                         const timer_stat_detail::duration& dur)
30
{
31
32
  StreamFormatScope format_scope(os);
32
33
32
  return os << (dur / std::chrono::seconds(1)) << "." << std::setfill('0')
34
16
            << std::setw(9) << std::right
35
32
            << (dur % std::chrono::seconds(1)).count();
36
}
37
38
26685
}  // namespace CVC4