tests: histogram prevent re-use of local variables

By moving the test to a separate function.

http://tracker.ceph.com/issues/9235 Fixes: #9235

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
(cherry picked from commit ee02293ad2ef050672fa8c164ba17b10e8d4ceeb)
tests: histogram prevent re-use of local variables

By moving the tests to separate functions.

http://tracker.ceph.com/issues/9235 Fixes: #9235

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
(cherry picked from commit 4b8b25ecd128c34a386ad7c4cc89f323c4d384e1)