Add string representation for cache mode
When relating to CacheMode enum, returned value was for example "CacheMode.WT" which doesn't look very pretty in logs or output. Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
This commit is contained in:
parent
1d2ecfad0e
commit
b1e653a61c
@ -3,7 +3,8 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
#
|
||||
|
||||
from enum import IntEnum, Enum
|
||||
from enum import IntEnum
|
||||
from aenum import Enum
|
||||
from test_utils.size import Size, Unit
|
||||
from datetime import timedelta
|
||||
|
||||
@ -18,13 +19,16 @@ class CacheLineSize(IntEnum):
|
||||
|
||||
|
||||
class CacheMode(Enum):
|
||||
WT = 0
|
||||
WB = 1
|
||||
WA = 2
|
||||
PT = 3
|
||||
WO = 4
|
||||
WT = "Write-Through"
|
||||
WB = "Write-Back"
|
||||
WA = "Write-Around"
|
||||
PT = "Pass-Through"
|
||||
WO = "Write-Only"
|
||||
DEFAULT = WT
|
||||
|
||||
def __str__(self):
|
||||
return self.value
|
||||
|
||||
|
||||
class SeqCutOffPolicy(Enum):
|
||||
full = 0
|
||||
|
Loading…
Reference in New Issue
Block a user