oneDNN has a built-in benchmarking program call benchdnn.
For a complete description of the available options and working examples, see the benchdnn readme.