Measuring the complexity of adaptive peer-to-peer systems