gem5 v24.0.0.0
|
#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. | |
TEST (StatsGroupTest, AddGetSingleStatGroup) | |
Test adding a single stat group to a root node. | |
TEST (StatsGroupDeathTest, AddUniqueNameStatGroup) | |
Test that group names are unique within a node's stat group. | |
TEST (StatsGroupTest, AddNotUniqueNameAmongGroups) | |
Test that group names are not unique among two nodes' stat groups. | |
TEST (StatsGroupDeathTest, AddNull) | |
Test that a group cannot add a non-existent group. | |
TEST (StatsGroupDeathTest, AddItself) | |
Test that a group cannot add itself. | |
TEST (StatsGroupDeathTest, DISABLED_AddCycle) | |
TEST (StatsGroupTest, AddGetMultipleStatGroup) | |
Test adding multiple stat groups to a root node. | |
TEST (StatsGroupTest, ConstructCorrectlyAssigned) | |
Make sure that the groups are correctly assigned in the map. | |
TEST (StatsGroupTest, ConstructOneLevelLinear) | |
Test that the constructor, when provided both the parent and the nodes' name, creates the following tree: | |
TEST (StatsGroupTest, ConstructOneLevelOfTwoNodes) | |
Test that the constructor, when provided both the parent and the nodes' name, creates the following tree: | |
TEST (StatsGroupTest, ConstructTwoLevelsLinear) | |
Test that the constructor, when provided both the parent and the nodes' name, creates the following tree: | |
TEST (StatsGroupTest, ConstructTwoLevelsUnbalancedTree) | |
Test that the constructor, when provided both the parent and the nodes' name, creates the following tree: | |
TEST (StatsGroupTest, AddGetStat) | |
Test adding stats to a group. | |
TEST (StatsGroupDeathTest, MergeStatGroupNoGroup) | |
Test that a group cannot merge if another group is not provided. | |
TEST (StatsGroupDeathTest, MergeStatGroupItself) | |
Test that a group cannot merge with itself. | |
TEST (StatsGroupTest, MergeStatGroup) | |
Test merging groups. | |
TEST (StatsGroupDeathTest, MergeStatGroupMergedParent) | |
Test that a group that has already been merged cannot be merged again. | |
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. | |
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. | |
TEST (StatsGroupTest, ConstructNoName) | |
Test that calling the constructor with a parent, but no name merges the groups. | |
TEST (StatsGroupTest, RegStats) | |
Test that calling regStats calls the respective function of all sub-groups and merged groups. | |
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. | |
TEST (StatsGroupTest, PreDumpStats) | |
Test that calling preDumpStats calls the respective function of all sub- groups and merged groups. | |
TEST (StatsGroupTest, ResolveStatNone) | |
Test that resolving a non-existent stat returns a nullptr. | |
TEST (StatsGroupTest, ResolveStatSelf) | |
Test resolving a stat belonging to the caller group. | |
TEST (StatsGroupTest, ResolveSubGroupStatFromParent) | |
Test that resolving stats from sub-groups is possible. | |
TEST (StatsGroupTest, ResolveStatSubGroupOnSubGroup) | |
Test that resolving a stat from the parent is not possible. | |
TEST (StatsGroupTest, ResolveStatMerged) | |
Test that resolving a merged stat is possible. | |
TEST (StatsGroupTest, ResolveStatMergedSubGroup) | |
Test that resolving a stat belonging to a merged sub-group is possible. | |
TEST | ( | StatsGroupDeathTest | , |
AddItself | ) |
Test that a group cannot add itself.
Definition at line 89 of file group.test.cc.
References gem5::statistics::Group::addStatGroup().
TEST | ( | StatsGroupDeathTest | , |
AddNull | ) |
Test that a group cannot add a non-existent group.
Definition at line 82 of file group.test.cc.
References gem5::statistics::Group::addStatGroup().
TEST | ( | StatsGroupDeathTest | , |
AddUniqueNameStatGroup | ) |
Test that group names are unique within a node's stat group.
Definition at line 60 of file group.test.cc.
References gem5::statistics::Group::addStatGroup().
TEST | ( | StatsGroupDeathTest | , |
DISABLED_AddCycle | ) |
Definition at line 96 of file group.test.cc.
References gem5::statistics::Group::addStatGroup().
TEST | ( | StatsGroupDeathTest | , |
MergeStatGroupItself | ) |
Test that a group cannot merge with itself.
Definition at line 303 of file group.test.cc.
References gem5::statistics::Group::mergeStatGroup().
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.
References gem5::statistics::Group::mergeStatGroup().
TEST | ( | StatsGroupDeathTest | , |
MergeStatGroupNoGroup | ) |
Test that a group cannot merge if another group is not provided.
Definition at line 296 of file group.test.cc.
References gem5::statistics::Group::mergeStatGroup().
TEST | ( | StatsGroupTest | , |
AddGetMultipleStatGroup | ) |
Test adding multiple stat groups to a root node.
Definition at line 107 of file group.test.cc.
References gem5::statistics::Group::addStatGroup(), and gem5::statistics::Group::getStatGroups().
TEST | ( | StatsGroupTest | , |
AddGetSingleStatGroup | ) |
Test adding a single stat group to a root node.
Definition at line 46 of file group.test.cc.
References gem5::statistics::Group::addStatGroup(), and gem5::statistics::Group::getStatGroups().
TEST | ( | StatsGroupTest | , |
AddGetStat | ) |
Test adding stats to a group.
Definition at line 273 of file group.test.cc.
References gem5::statistics::Group::addStat(), gem5::statistics::Group::getStats(), name(), and gem5::statistics::Info::setName().
TEST | ( | StatsGroupTest | , |
AddNotUniqueNameAmongGroups | ) |
Test that group names are not unique among two nodes' stat groups.
Definition at line 70 of file group.test.cc.
References gem5::statistics::Group::addStatGroup().
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 gem5::statistics::Group::addStat(), gem5::statistics::Group::getStats(), gem5::statistics::Group::mergeStatGroup(), name(), and gem5::statistics::Info::setName().
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 gem5::statistics::Group::addStat(), gem5::statistics::Group::getStats(), gem5::statistics::Group::mergeStatGroup(), name(), and gem5::statistics::Info::setName().
TEST | ( | StatsGroupTest | , |
ConstructCorrectlyAssigned | ) |
Make sure that the groups are correctly assigned in the map.
Definition at line 125 of file group.test.cc.
References gem5::statistics::Group::addStatGroup(), and gem5::statistics::Group::getStatGroups().
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 gem5::statistics::Group::addStat(), gem5::statistics::Group::getStats(), name(), and gem5::statistics::Info::setName().
TEST | ( | StatsGroupTest | , |
ConstructNoParent | ) |
Test that the constructor without a parent doesn't do anything.
Definition at line 39 of file group.test.cc.
References gem5::statistics::Group::getStatGroups().
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.
References gem5::statistics::Group::getStatGroups().
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.
References gem5::statistics::Group::getStatGroups().
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.
References gem5::statistics::Group::getStatGroups().
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.
References gem5::statistics::Group::getStatGroups().
TEST | ( | StatsGroupTest | , |
MergeStatGroup | ) |
Test merging groups.
Definition at line 310 of file group.test.cc.
References gem5::statistics::Group::addStat(), gem5::statistics::Group::getStats(), gem5::statistics::Group::mergeStatGroup(), name(), and gem5::statistics::Info::setName().
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.
References gem5::statistics::Group::Group(), and gem5::statistics::Group::preDumpStats().
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.
References gem5::statistics::Group::Group(), and gem5::statistics::Group::regStats().
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 gem5::statistics::Group::addStat(), gem5::statistics::Group::resetStats(), gem5::statistics::Info::setName(), and DummyInfo::value.
TEST | ( | StatsGroupTest | , |
ResolveStatMerged | ) |
Test that resolving a merged stat is possible.
Definition at line 619 of file group.test.cc.
References gem5::statistics::Group::addStat(), gem5::statistics::Group::mergeStatGroup(), gem5::statistics::Group::resolveStat(), and gem5::statistics::Info::setName().
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.
References gem5::statistics::Group::addStat(), gem5::statistics::Group::addStatGroup(), gem5::statistics::Group::mergeStatGroup(), gem5::statistics::Group::resolveStat(), and gem5::statistics::Info::setName().
TEST | ( | StatsGroupTest | , |
ResolveStatNone | ) |
Test that resolving a non-existent stat returns a nullptr.
Definition at line 526 of file group.test.cc.
References gem5::statistics::Group::addStat(), gem5::statistics::Group::resolveStat(), and gem5::statistics::Info::setName().
TEST | ( | StatsGroupTest | , |
ResolveStatSelf | ) |
Test resolving a stat belonging to the caller group.
Definition at line 539 of file group.test.cc.
References gem5::statistics::Group::addStat(), gem5::statistics::Group::resolveStat(), and gem5::statistics::Info::setName().
TEST | ( | StatsGroupTest | , |
ResolveStatSubGroupOnSubGroup | ) |
Test that resolving a stat from the parent is not possible.
Definition at line 605 of file group.test.cc.
References gem5::statistics::Group::addStat(), gem5::statistics::Group::resolveStat(), and gem5::statistics::Info::setName().
TEST | ( | StatsGroupTest | , |
ResolveSubGroupStatFromParent | ) |
Test that resolving stats from sub-groups is possible.
Definition at line 569 of file group.test.cc.
References gem5::statistics::Group::addStat(), gem5::statistics::Group::resolveStat(), and gem5::statistics::Info::setName().