def _getHierBenchNameFromFullname(benchFullname):
    """
    Turn a bench name that potentially looks like this:
       'foodir/bench_algos.py::BenchStuff::bench_bfs[1-2-False-True]'
    into this:
       'foodir.bench_algos.BenchStuff.bench_bfs'
    """
    benchFullname = benchFullname.partition("[")[0]  # strip any params
    (modName, _, benchName) = benchFullname.partition("::")

    if modName.endswith(".py"):
        modName = modName.partition(".")[0]

    modName = modName.replace("/", ".")
    benchName = benchName.replace("::", ".")

    return "%s.%s" % (modName, benchName)