diff --git a/src/python/m5/ext/pystats/statistic.py b/src/python/m5/ext/pystats/statistic.py index 3fb4fc11f6..ebe24fbbca 100644 --- a/src/python/m5/ext/pystats/statistic.py +++ b/src/python/m5/ext/pystats/statistic.py @@ -164,7 +164,7 @@ class Distribution(Vector): def __init__( self, - value: Iterable[int], + value: Dict[Union[int, float], Scalar], min: Union[float, int], max: Union[float, int], num_bins: int, diff --git a/src/python/m5/stats/gem5stats.py b/src/python/m5/stats/gem5stats.py index 5e0d57ec15..bd17994a59 100644 --- a/src/python/m5/stats/gem5stats.py +++ b/src/python/m5/stats/gem5stats.py @@ -167,8 +167,16 @@ def __get_distribution(statistic: _m5.stats.DistInfo) -> Distribution: overflow = statistic.overflow logs = statistic.logs + parsed_values = {} + for index in range(len(value)): + parsed_values[index] = Scalar( + value=value[index], + unit=statistic.unit, + datatype=StorageType["f64"], + ) + return Distribution( - value=value, + value=parsed_values, min=min, max=max, num_bins=num_bins,