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) {
141141 .def_property_readonly (
142142 " blocks" ,
143143 [](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+ })
144150 .def (" __repr__" , [](const Benchmark &Bench) {
145151 return " <Benchmark(name=" + Bench.Name + " , " +
146152 std::to_string (Bench.Blocks .size ()) + " blocks)>" ;
Original file line number Diff line number Diff line change @@ -62,6 +62,10 @@ def blocks(self):
6262 def raw_log (self ):
6363 return self .__cpp .raw_log
6464
65+ @property
66+ def info (self ):
67+ return self .__cpp .info
68+
6569 # Inherit __iter__
6670
6771 # Inherit .benchmarks
You can’t perform that action at this time.
0 commit comments