[gem5-dev] Change in gem5/gem5[develop]: base-stats,python: Expose a stat's unit via PyBind11

2021-02-26 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/41753 )


Change subject: base-stats,python: Expose a stat's unit via PyBind11
..

base-stats,python: Expose a stat's unit via PyBind11

Change-Id: I77df868a6bc92e5bb0a39592b5aca8e0d259bb05
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41753
Tested-by: kokoro 
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
---
M src/python/pybind11/stats.cc
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/python/pybind11/stats.cc b/src/python/pybind11/stats.cc
index 1e6773f..f1b1e9c 100644
--- a/src/python/pybind11/stats.cc
+++ b/src/python/pybind11/stats.cc
@@ -132,6 +132,9 @@
 py::class_>(
 m, "Info")
 .def_readwrite("name", ::Info::name)
+.def_property_readonly("unit", [](const Stats::Info ) {
+return info.unit->getUnitString();
+})
 .def_readonly("desc", ::Info::desc)
 .def_readonly("id", ::Info::id)
 .def_property_readonly("flags", [](const Stats::Info ) {



1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the  
submitted one.

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/41753
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I77df868a6bc92e5bb0a39592b5aca8e0d259bb05
Gerrit-Change-Number: 41753
Gerrit-PatchSet: 8
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
Gerrit-MessageType: merged
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: base-stats,python: Expose a stat's unit via PyBind11

2021-02-22 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/41753 )



Change subject: base-stats,python: Expose a stat's unit via PyBind11
..

base-stats,python: Expose a stat's unit via PyBind11

Change-Id: I77df868a6bc92e5bb0a39592b5aca8e0d259bb05
---
M src/python/pybind11/stats.cc
1 file changed, 3 insertions(+), 0 deletions(-)



diff --git a/src/python/pybind11/stats.cc b/src/python/pybind11/stats.cc
index 1e6773f..f1b1e9c 100644
--- a/src/python/pybind11/stats.cc
+++ b/src/python/pybind11/stats.cc
@@ -132,6 +132,9 @@
 py::class_>(
 m, "Info")
 .def_readwrite("name", ::Info::name)
+.def_property_readonly("unit", [](const Stats::Info ) {
+return info.unit->getUnitString();
+})
 .def_readonly("desc", ::Info::desc)
 .def_readonly("id", ::Info::id)
 .def_property_readonly("flags", [](const Stats::Info ) {

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/41753
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I77df868a6bc92e5bb0a39592b5aca8e0d259bb05
Gerrit-Change-Number: 41753
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s