Characterising the behaviour of stochastic local search