Quantitative Assessment of Resilience In Complex Systems