gem5  v21.1.0.2
Classes | Functions
group.test.cc File Reference
#include <gtest/gtest-spi.h>
#include <gtest/gtest.h>
#include "base/stats/group.hh"
#include "base/stats/info.hh"
#include "base/stats/output.hh"

Go to the source code of this file.

Classes

class  DummyInfo
 

Functions

 TEST (StatsGroupTest, ConstructNoParent)
 Test that the constructor without a parent doesn't do anything. More...
 
 TEST (StatsGroupTest, AddGetSingleStatGroup)
 Test adding a single stat group to a root node. More...
 
 TEST (StatsGroupDeathTest, AddUniqueNameStatGroup)
 Test that group names are unique within a node's stat group. More...
 
 TEST (StatsGroupTest, AddNotUniqueNameAmongGroups)
 Test that group names are not unique among two nodes' stat groups. More...
 
 TEST (StatsGroupDeathTest, AddNull)
 Test that a group cannot add a non-existent group. More...
 
 TEST (StatsGroupDeathTest, AddItself)
 Test that a group cannot add itself. More...
 
 TEST (StatsGroupDeathTest, DISABLED_AddCycle)
 
 TEST (StatsGroupTest, AddGetMultipleStatGroup)
 Test adding multiple stat groups to a root node. More...
 
 TEST (StatsGroupTest, ConstructCorrectlyAssigned)
 Make sure that the groups are correctly assigned in the map. More...
 
 TEST (StatsGroupTest, ConstructOneLevelLinear)
 Test that the constructor, when provided both the parent and the nodes' name, creates the following tree: More...
 
 TEST (StatsGroupTest, ConstructOneLevelOfTwoNodes)
 Test that the constructor, when provided both the parent and the nodes' name, creates the following tree: More...
 
 TEST (StatsGroupTest, ConstructTwoLevelsLinear)
 Test that the constructor, when provided both the parent and the nodes' name, creates the following tree: More...
 
 TEST (StatsGroupTest, ConstructTwoLevelsUnbalancedTree)
 Test that the constructor, when provided both the parent and the nodes' name, creates the following tree: More...
 
 TEST (StatsGroupTest, AddGetStat)
 Test adding stats to a group. More...
 
 TEST (StatsGroupDeathTest, MergeStatGroupNoGroup)
 Test that a group cannot merge if another group is not provided. More...
 
 TEST (StatsGroupDeathTest, MergeStatGroupItself)
 Test that a group cannot merge with itself. More...
 
 TEST (StatsGroupTest, MergeStatGroup)
 Test merging groups. More...
 
 TEST (StatsGroupDeathTest, MergeStatGroupMergedParent)
 Test that a group that has already been merged cannot be merged again. More...
 
 TEST (StatsGroupTest, AddStatMergedParent)
 Test that after a group has been merged, adding stats to it will add stats to the group it was merged to too. More...
 
 TEST (StatsGroupTest, AddStatMergedParentMain)
 Test that after a group has been merged, adding stats to the "main" group does not add stats to the group it was merged to. More...
 
 TEST (StatsGroupTest, ConstructNoName)
 Test that calling the constructor with a parent, but no name merges the groups. More...
 
 TEST (StatsGroupTest, RegStats)
 Test that calling regStats calls the respective function of all sub-groups and merged groups. More...
 
 TEST (StatsGroupTest, ResetStats)
 Test that resetting a stat from a specific node reset the stats of all its sub-groups and merged groups, and that it does not reset the stats of its parents. More...
 
 TEST (StatsGroupTest, PreDumpStats)
 Test that calling preDumpStats calls the respective function of all sub- groups and merged groups. More...
 
 TEST (StatsGroupTest, ResolveStatNone)
 Test that resolving a non-existent stat returns a nullptr. More...
 
 TEST (StatsGroupTest, ResolveStatSelf)
 Test resolving a stat belonging to the caller group. More...
 
 TEST (StatsGroupTest, ResolveSubGroupStatFromParent)
 Test that resolving stats from sub-groups is possible. More...
 
 TEST (StatsGroupTest, ResolveStatSubGroupOnSubGroup)
 Test that resolving a stat from the parent is not possible. More...
 
 TEST (StatsGroupTest, ResolveStatMerged)
 Test that resolving a merged stat is possible. More...
 
 TEST (StatsGroupTest, ResolveStatMergedSubGroup)
 Test that resolving a stat belonging to a merged sub-group is possible. More...
 

Function Documentation

◆ TEST() [1/30]

TEST ( StatsGroupDeathTest  ,
AddItself   
)

Test that a group cannot add itself.

Definition at line 89 of file group.test.cc.

◆ TEST() [2/30]

TEST ( StatsGroupDeathTest  ,
AddNull   
)

Test that a group cannot add a non-existent group.

Definition at line 82 of file group.test.cc.

◆ TEST() [3/30]

TEST ( StatsGroupDeathTest  ,
AddUniqueNameStatGroup   
)

Test that group names are unique within a node's stat group.

Definition at line 60 of file group.test.cc.

◆ TEST() [4/30]

TEST ( StatsGroupDeathTest  ,
DISABLED_AddCycle   
)
Todo:
Test that a group cannot be added in a cycle.

Definition at line 96 of file group.test.cc.

◆ TEST() [5/30]

TEST ( StatsGroupDeathTest  ,
MergeStatGroupItself   
)

Test that a group cannot merge with itself.

Definition at line 303 of file group.test.cc.

◆ TEST() [6/30]

TEST ( StatsGroupDeathTest  ,
MergeStatGroupMergedParent   
)

Test that a group that has already been merged cannot be merged again.

Definition at line 330 of file group.test.cc.

◆ TEST() [7/30]

TEST ( StatsGroupDeathTest  ,
MergeStatGroupNoGroup   
)

Test that a group cannot merge if another group is not provided.

Definition at line 296 of file group.test.cc.

◆ TEST() [8/30]

TEST ( StatsGroupTest  ,
AddGetMultipleStatGroup   
)

Test adding multiple stat groups to a root node.

Definition at line 107 of file group.test.cc.

◆ TEST() [9/30]

TEST ( StatsGroupTest  ,
AddGetSingleStatGroup   
)

Test adding a single stat group to a root node.

Definition at line 46 of file group.test.cc.

◆ TEST() [10/30]

TEST ( StatsGroupTest  ,
AddGetStat   
)

Test adding stats to a group.

Definition at line 273 of file group.test.cc.

References name().

◆ TEST() [11/30]

TEST ( StatsGroupTest  ,
AddNotUniqueNameAmongGroups   
)

Test that group names are not unique among two nodes' stat groups.

Definition at line 70 of file group.test.cc.

◆ TEST() [12/30]

TEST ( StatsGroupTest  ,
AddStatMergedParent   
)

Test that after a group has been merged, adding stats to it will add stats to the group it was merged to too.

Definition at line 343 of file group.test.cc.

References name().

◆ TEST() [13/30]

TEST ( StatsGroupTest  ,
AddStatMergedParentMain   
)

Test that after a group has been merged, adding stats to the "main" group does not add stats to the group it was merged to.

Definition at line 370 of file group.test.cc.

References name().

◆ TEST() [14/30]

TEST ( StatsGroupTest  ,
ConstructCorrectlyAssigned   
)

Make sure that the groups are correctly assigned in the map.

Definition at line 125 of file group.test.cc.

◆ TEST() [15/30]

TEST ( StatsGroupTest  ,
ConstructNoName   
)

Test that calling the constructor with a parent, but no name merges the groups.

Definition at line 392 of file group.test.cc.

References name().

◆ TEST() [16/30]

TEST ( StatsGroupTest  ,
ConstructNoParent   
)

Test that the constructor without a parent doesn't do anything.

Definition at line 39 of file group.test.cc.

◆ TEST() [17/30]

TEST ( StatsGroupTest  ,
ConstructOneLevelLinear   
)

Test that the constructor, when provided both the parent and the nodes' name, creates the following tree:

root | node1

Definition at line 147 of file group.test.cc.

◆ TEST() [18/30]

TEST ( StatsGroupTest  ,
ConstructOneLevelOfTwoNodes   
)

Test that the constructor, when provided both the parent and the nodes' name, creates the following tree:

root / \ node1 node2

Definition at line 167 of file group.test.cc.

◆ TEST() [19/30]

TEST ( StatsGroupTest  ,
ConstructTwoLevelsLinear   
)

Test that the constructor, when provided both the parent and the nodes' name, creates the following tree:

root | node1 | node1_1

Definition at line 192 of file group.test.cc.

◆ TEST() [20/30]

TEST ( StatsGroupTest  ,
ConstructTwoLevelsUnbalancedTree   
)

Test that the constructor, when provided both the parent and the nodes' name, creates the following tree:

   root
  /     \

node1 node2 | / \ node1_1 node2_1 node2_2

Definition at line 220 of file group.test.cc.

◆ TEST() [21/30]

TEST ( StatsGroupTest  ,
MergeStatGroup   
)

Test merging groups.

Definition at line 310 of file group.test.cc.

References name().

◆ TEST() [22/30]

TEST ( StatsGroupTest  ,
PreDumpStats   
)

Test that calling preDumpStats calls the respective function of all sub- groups and merged groups.

Definition at line 492 of file group.test.cc.

◆ TEST() [23/30]

TEST ( StatsGroupTest  ,
RegStats   
)

Test that calling regStats calls the respective function of all sub-groups and merged groups.

Definition at line 410 of file group.test.cc.

◆ TEST() [24/30]

TEST ( StatsGroupTest  ,
ResetStats   
)

Test that resetting a stat from a specific node reset the stats of all its sub-groups and merged groups, and that it does not reset the stats of its parents.

Definition at line 448 of file group.test.cc.

References DummyInfo::value.

◆ TEST() [25/30]

TEST ( StatsGroupTest  ,
ResolveStatMerged   
)

Test that resolving a merged stat is possible.

Definition at line 619 of file group.test.cc.

◆ TEST() [26/30]

TEST ( StatsGroupTest  ,
ResolveStatMergedSubGroup   
)

Test that resolving a stat belonging to a merged sub-group is possible.

Definition at line 643 of file group.test.cc.

◆ TEST() [27/30]

TEST ( StatsGroupTest  ,
ResolveStatNone   
)

Test that resolving a non-existent stat returns a nullptr.

Definition at line 526 of file group.test.cc.

◆ TEST() [28/30]

TEST ( StatsGroupTest  ,
ResolveStatSelf   
)

Test resolving a stat belonging to the caller group.

Definition at line 539 of file group.test.cc.

◆ TEST() [29/30]

TEST ( StatsGroupTest  ,
ResolveStatSubGroupOnSubGroup   
)

Test that resolving a stat from the parent is not possible.

Definition at line 605 of file group.test.cc.

◆ TEST() [30/30]

TEST ( StatsGroupTest  ,
ResolveSubGroupStatFromParent   
)

Test that resolving stats from sub-groups is possible.

Definition at line 569 of file group.test.cc.


Generated on Tue Sep 21 2021 12:26:26 for gem5 by doxygen 1.8.17