The performance can be configuration specific, so beware that any outcome is specific to a machine. Take care that you test on the right configuration(s).
The performance may also be specific to a certain input size. So test for specific amounts of data while keeping in mind that most hash methods operate on blocks (it doesn't make much sense to test 1 byte input and then 2 byte input, one block will be hashed regardless).
You don't need a lot more than a timer to measure such performance. First do x rounds of hashing just to make sure you are not left with startup flukes (hash code not loaded in cache of CPU yet). Note that this is specifically required when running on a VM. So for C / Linux it may not be that relevant - you can choose a smaller
Now let it run
n rounds, divide by
n. Choose a large number for n. That's about it.
If you want to reuse existing code then you can simply reuse the
openssl speed commands. Just look up what happens in the code for
openssl speed sha256 and implement another one next to it or extract the code.