The attached is the C# code that I used for generating the test results charted in my previous post.
Note that for testing no generated script is actually persisted into a file by this program. The Script() method is applied, but the resulting script strings are thrown away. For example, here is how a stored procedure is scripted:
StringCollection sc = db.StoredProcedures.ItemById(objectId).Script();
foreach (string s in sc)
{ };
You can run the compiled program as follows:
cmd>smpScript.exe <server name> <database name> <number of threads>