File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -21,9 +21,10 @@ $./mtime.sh ~/.pyenv/versions/cmd2-3.6/bin/python -c ""
2121average: real 0.028 user 0.020 sys 0.000
2222```
2323
24+
2425## Initial measurement
2526
26- From commit c7753352b , which has ` __init.py__ ` importing ` cmd2.cmd2.Cmd `
27+ From commit fbbfe256 , which has ` __init.py__ ` importing ` cmd2.cmd2.Cmd `
2728and a bunch of other stuff, we get:
2829```
2930$ ./mtime.sh ~/.pyenv/versions/cmd2-3.6/bin/python -c "import cmd2"
@@ -34,3 +35,13 @@ average: real 0.140 user 0.100 sys 0.030
3435From the baseline and this initial measurement, we infer it takes ~ 110 ms
3536to import the ` cmd2 ` module.
3637
38+
39+ ## Defer unittest
40+
41+ In commit 8bc2c37a we deferring the import of ` unittest ` until we need it to
42+ test a transcript.
43+ ```
44+ $./mtime.sh ~/.pyenv/versions/cmd2-3.6/bin/python -c "import cmd2"
45+ 100 iterations
46+ average: real 0.131 user 0.091 sys 0.030
47+ ```
You can’t perform that action at this time.
0 commit comments