This file is indexed.

/usr/include/kvutils/kvu_procedure_timer.h is in libkvutils-dev 2.8.1-5build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// -*- mode: C++; -*-
#ifndef INCLUDED_KVU_PROCEDURE_TIMER
#define INCLUDED_KVU_PROCEDURE_TIMER

#include <sys/time.h>
#include <unistd.h>
#include <string>

/**
 * Procedure timer. Meant for timing and gathering statistics of 
 * repeating events.
 * 
 * @author Kai Vehmanen
 */
class PROCEDURE_TIMER {

 public:
  void set_upper_bound(const struct timeval *);
  void set_upper_bound_seconds(double secs);
  void set_lower_bound(const struct timeval *);
  void set_lower_bound_seconds(double secs);
  
  void start(void);
  void stop(void);
  void reset(void);

  long int events_over_upper_bound(void) const;
  long int events_under_lower_bound(void) const;
  long int event_count(void) const;
  double max_duration_seconds(void) const;
  double min_duration_seconds(void) const;
  double average_duration_seconds(void) const;
  double last_duration_seconds(void) const;
  const struct timeval* min_duration(void) const;
  const struct timeval* max_duration(void) const;
  std::string to_string(void) const;

  PROCEDURE_TIMER(int id = 0);
  ~PROCEDURE_TIMER(void);

 private:

  PROCEDURE_TIMER(const PROCEDURE_TIMER& x) { }
  PROCEDURE_TIMER& operator=(const PROCEDURE_TIMER& x) { return *this; }

  bool less_than(const struct timeval *i, const struct timeval *ii) const;
  void subtract(struct timeval *i, const struct timeval *ii) const;
  double to_seconds(const struct timeval *i) const;

  struct timeval start_rep;
  struct timeval now_rep;
  struct timeval min_event_rep;
  struct timeval max_event_rep;
  struct timeval lower_bound_rep;
  struct timeval upper_bound_rep;

  double event_time_total_rep;
  double last_duration_rep;
  long int events_rep;
  long int events_over_bound_rep;
  long int events_under_bound_rep;

  std::string idstr_rep;
};

#endif