File: ParserStats.hpp

package info (click to toggle)
vite 1.4-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 19,112 kB
  • sloc: cpp: 30,167; makefile: 467; sh: 233; python: 140; ansic: 67
file content (74 lines) | stat: -rw-r--r-- 1,668 bytes parent folder | download | duplicates (3)
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
67
68
69
70
71
72
73
74
/**
 *
 * @file plugins/CriticalPath/ParserStats.hpp
 *
 * @copyright 2008-2024 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
 *                      Univ. Bordeaux. All rights reserved.
 *
 * @author Camille Ordronneau
 * @author Johnny Jazeix
 * @author Mathieu Faverge
 * @author Mohamed Faycal Boullit
 *
 * @date 2024-07-17
 */
// #include <boost/filesystem/operations.hpp>
#include <fstream>
#include <iostream>
#include <vector>

typedef std::pair<double, double> pair;
typedef std::pair<std::string, std::string> stringpair;
typedef std::pair<pair, pair> doublepair;

class ParserStats
{

private:
    std::vector<double> _task_time;
    double _critical_path_length;
    double _max_breadth;
    stringpair _files; // first .dot second .rec
    std::vector<int> _criticalPath;
    pair _mb_interval;
    double _task_count;
    double _computing_volume;

public:
    /*!
     * \brief ParserStats Constructor parses files and uses computing modules to initialize all statistics
     * \param filename1 .dot / DAG file
     * \param filename2 .rec file
     */
    ParserStats(std::string filename1, std::string filename2);

    /*!
     * \brief ParserStats Destructor
     */
    ~ParserStats();

    /*!
     * \brief Critical Path Length getter
     */
    double get_critical_path_length();

    /*!
     * \brief Max Breadth getter
     */
    double get_max_breadth();

    /*!
     * \brief Max Breadth Interval getter
     */
    pair get_max_breadth_interval();

    /*!
     * \brief Task count getter
     */
    double get_task_count();

    /*!
     * \brief Critical Path task Id Vector getter
     */
    std::vector<int> get_critical_path();
};