Friedrich Nietzsche said this quote

I assess the power of a will by how much resistance, pain, torture it endures and knows how to turn to its advantage