This file is indexed.

/usr/include/arc/JobPerfLog.h is in nordugrid-arc-dev 5.4.2-1build1.

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
#ifndef __ARC_JOB_PERF_LOGGER__
#define __ARC_JOB_PERF_LOGGER__

#include <time.h>
#include <string>

namespace Arc {

class JobPerfLog {
 public:
  JobPerfLog();
  
  ~JobPerfLog();
  
  void SetOutput(const std::string& filename);

  void SetEnabled(bool enabled);

  const std::string& GetOutput() const { return log_path; };

  bool GetEnabled() const { return log_enabled; };

  /** Log one performance record. */
  void Log(const std::string& name, const std::string& id, const timespec& start, const timespec& end);


 private:
   std::string log_path;
   bool log_enabled;

};

class JobPerfRecord {
 public:
  /** Creates object */
  JobPerfRecord(JobPerfLog& log);

  /** Creates object and calls Start() */
  JobPerfRecord(JobPerfLog& log, const std::string& id);

  /** Prepare to log one record by remembering start time of action being measured. */
  void Start(const std::string& id);

  /** Log performance record started by previous LogStart(). */
  void End(const std::string& name);

  bool Started() { return start_recorded; };

 private:
   JobPerfLog& perf_log;
   bool start_recorded;
   timespec start_time;
   std::string start_id;

};

} // namespace Arc

#endif // __ARC_JOB_PERF_LOGGER__