File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -141,6 +141,12 @@ void ev::defTypes(py::module &Mod) {
141
141
.def_property_readonly (
142
142
" blocks" ,
143
143
[](const Benchmark &Bench) { return BenchmarkBlocks{Bench.Blocks }; })
144
+ .def_property_readonly (" info" ,
145
+ [](const Benchmark &Bench) -> py::dict {
146
+ using namespace pybind11 ::literals;
147
+
148
+ return py::dict (" name" _a = Bench.Name );
149
+ })
144
150
.def (" __repr__" , [](const Benchmark &Bench) {
145
151
return " <Benchmark(name=" + Bench.Name + " , " +
146
152
std::to_string (Bench.Blocks .size ()) + " blocks)>" ;
Original file line number Diff line number Diff line change @@ -62,6 +62,10 @@ def blocks(self):
62
62
def raw_log (self ):
63
63
return self .__cpp .raw_log
64
64
65
+ @property
66
+ def info (self ):
67
+ return self .__cpp .info
68
+
65
69
# Inherit __iter__
66
70
67
71
# Inherit .benchmarks
You can’t perform that action at this time.
0 commit comments