[beginner] Benchmarking MLIR functions

Hi all,
My name is Giuseppe and I am new in the LLVM/MLIR world, so sorry in advance for any naive question I might ask.

I am using MLIR in an effort to optimize linear algebra operators on a given architecture.

After following the Toy tutorial and reading some documentation, I would like to produce a similar scenario:
a) MLIR function test_mul.mlir like:

func test_mul(%a:memref<10x10xf32>, %b:memref<10x10xf32>){
linalg.matmul(%a,%b)
return
}

b) Test environment where I can feed test_mul with some inputs and measure how long it takes to execute

While I was able to obtain something like a), I am struggling to create a standalone test like b). Do you have an example/link/resource that show how to do this? Or any bootstrapping suggestions?

Thank you in advance,
Giuseppe

There are few examples in Tensorflow: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/compiler/mlir/tfrt/benchmarks/compute_function_benchmark.cc. It compiles MLIR blob to executable at runtime, and uses google benchmark library for running benchmarks (https://github.com/google/benchmark).