diff --git a/README.md b/README.md index 1079fea..e0dd57a 100644 --- a/README.md +++ b/README.md @@ -1936,7 +1936,7 @@ with .begin(): ... # Exits the block with commit or ```text +------------+--------------+----------+----------------------------------+ -| Dialect | pip3 install | import | Dependencies | +| Dialect | pip3 install | import | Dependencies | +------------+--------------+----------+----------------------------------+ | mysql | mysqlclient | MySQLdb | www.pypi.org/project/mysqlclient | | postgresql | psycopg2 | psycopg2 | www.pypi.org/project/psycopg2 | @@ -2598,8 +2598,7 @@ duration_in_seconds = perf_counter() - start_time ### Profiling by Line ```text $ pip3 install line_profiler -$ echo " -@profile +$ echo "@profile def main(): a = list(range(10000)) b = set(range(10000)) @@ -2615,8 +2614,8 @@ Line # Hits Time Per Hit % Time Line Contents ### Call and Flame Graphs ```text -$ pip3 install gprof2dot snakeviz -$ apt/brew install graphviz +$ pip3 install gprof2dot snakeviz; apt/brew install graphviz +$ tail -n 4 test.py > test.py $ python3 -m cProfile -o test.prof test.py $ gprof2dot -f pstats test.prof | dot -Tpng -o test.png; xdg-open/open test.png $ snakeviz test.prof diff --git a/index.html b/index.html index 5364f92..3b77db2 100644 --- a/index.html +++ b/index.html @@ -54,7 +54,7 @@
- +
@@ -1610,7 +1610,7 @@ CompletedProcess(args=['bc', ┏━━━━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ -┃ Dialect │ pip3 install │ import │ Dependencies ┃ +┃ Dialect │ pip3 install │ import │ Dependencies ┃ ┠────────────┼──────────────┼──────────┼──────────────────────────────────┨ ┃ mysql │ mysqlclient │ MySQLdb │ www.pypi.org/project/mysqlclient ┃ ┃ postgresql │ psycopg2 │ psycopg2 │ www.pypi.org/project/psycopg2 ┃ @@ -2129,8 +2129,7 @@ duration_in_seconds = perf_counter() - start_time

Profiling by Line

$ pip3 install line_profiler
-$ echo "
-@profile
+$ echo "@profile
 def main():
     a = list(range(10000))
     b = set(range(10000))
@@ -2144,8 +2143,8 @@ Line #   Hits     Time  Per Hit   % Time  Line Contents
      4      1    487.0    487.0     68.9      b = set(range(10000))
 
-

Call and Flame Graphs

$ pip3 install gprof2dot snakeviz
-$ apt/brew install graphviz
+

Call and Flame Graphs

$ pip3 install gprof2dot snakeviz; apt/brew install graphviz
+$ tail -n 4 test.py > test.py
 $ python3 -m cProfile -o test.prof test.py
 $ gprof2dot -f pstats test.prof | dot -Tpng -o test.png; xdg-open/open test.png
 $ snakeviz test.prof
@@ -2933,7 +2932,7 @@ $ pyinstaller script.py --add-data '<path>:.'  
  
 
   
 
diff --git a/parse.js b/parse.js
index d7f978d..8f70b38 100755
--- a/parse.js
+++ b/parse.js
@@ -461,12 +461,12 @@ const DIAGRAM_9_B =
 
 const DIAGRAM_95_A =
   '+------------+--------------+----------+----------------------------------+\n' +
-  '| Dialect    | pip3 install |  import  |           Dependencies           |\n' +
+  '| Dialect    | pip3 install | import   |           Dependencies           |\n' +
   '+------------+--------------+----------+----------------------------------+\n';
 
 const DIAGRAM_95_B =
   '┏━━━━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n' +
-  '┃ Dialect    │ pip3 install │  import  │           Dependencies           ┃\n' +
+  '┃ Dialect    │ pip3 install │ import   │           Dependencies           ┃\n' +
   '┠────────────┼──────────────┼──────────┼──────────────────────────────────┨\n' +
   '┃ mysql      │ mysqlclient  │ MySQLdb  │ www.pypi.org/project/mysqlclient ┃\n' +
   '┃ postgresql │ psycopg2     │ psycopg2 │ www.pypi.org/project/psycopg2    ┃\n' +