The best way to measure CPUs is to come up with a benchmark that's representative of the task that you want to complete. So if you wanted to measure video editing performance, you'd find a benchmark of Adobe Premiere or a similar piece of software. If you wanted to measure gaming performance, you'd find a benchmark of the game you're interested in.
What factors determine end performance of a PC in any given task is a very complex question, which is why treating the components as "black boxes" makes sense when you start trying to characterize the workload. You run your benchmark, then change out the CPU and run the benchmark again. Keep doing that with a wide variety of components until you get and idea of which CPU performs the best.
Then you look at the differences between a CPU that runs the benchmark quickly and one that doesn't run it as quickly. Does the faster CPU have more cores, a higher clock speed, more cache? Once you've found the differences, you try to eliminate them one by one. Maybe you'll test two CPUs with the same clock speed, but different core counts. Or you'll find two CPUs with the same number of cores but different clock speeds. Eventually you'll figure out what element of the CPU is the most important. Usually it'll be a combination of different aspects, but some will matter more.
Or you might determine that the CPU has very little to no effect on your benchmark. Then you'll start looking at different components like the GPU, amount of memory, speed of memory, and speed of the disk.