A Log Writing Demonstration
Learn about log capturing and stress testing, and evaluate the impact of the BogoSort algorithm on the responsiveness and performance of client applications.
We'll cover the following...
Overview
To demonstrate how this log catching works, this client application writes a bunch of messages and does an immense amount of computing. To see how responsive the log catcher is, we can start a bunch of copies of this application to stress-test the log catcher.
This client doesn’t leverage asyncio
; it’s a contrived example of compute-intensive work with a few I/O requests wrapped around it. Using coroutines to perform the I/O requests concurrently with the computation is—by design—unhelpful in this example.
Example
We’ve written an application that applies a variation on the bogosort algorithm to some random data. This isn’t a practical algorithm, but it’s simple: it enumerates all possible orderings, searching for one that is the desired, ascending order. Here are the imports and an abstract superclass, ...