If you benefit from web2py hope you feel encouraged to pay it forward by contributing back to society in whatever form you choose!

Change :
- Path with your Own Path
- Password with your Rocket Server Password

  1. Open Command Prompt (Start > Accessories > Command Prompt)

  2. Download and Install Firefox
    powershell -Command "(New-Object Net.WebClient).DownloadFile('https://download-installer.cdn.mozilla.net/pub/firefox/releases/38.0/win32/en-US/Firefox%20Setup%20Stub%2038.0.exe', 'C:\Firefox Setup Stub 38.0.exe')"
    "C:\Firefox Setup Stub 38.0.exe"

  3. Download and Install 7 Zip for Extract Web2py Source
    powershell -Command "(New-Object Net.WebClient).DownloadFile('http://nchc.dl.sourceforge.net/project/sevenzip/7-Zip/9.20/7z920.msi', 'C:\7z920.msi')"
    C:\7z920.msi /quiet /passive

  4. Download and Install Python Windows binary
    powershell -Command "(New-Object Net.WebClient).DownloadFile('http://www.python.org/ftp/python/2.7.9/python-2.7.9.msi', 'C:\python-2.7.9.msi')"
    C:\python-2.7.9.msi /quiet /passive

  5. Download ez_setup.py
    powershell -Command "(New-Object Net.WebClient).DownloadFile('https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py', 'C:\ez_setup.py')"

  6. Install python easy_install
    python C:\ez_setup.py

  7. Install python pip using easy_install
    easy_install pip

  8. Install snakeviz using pip
    pip install snakeviz

  9. Download and Install Graphviz
    powershell -Command "(New-Object Net.WebClient).DownloadFile('http://www.graphviz.org/pub/graphviz/stable/windows/graphviz-2.38.msi', 'C:\graphviz-2.38.msi')"
    C:\graphviz-2.38.msi /quiet /passive

  10. Download Web2py Source Code
    powershell -Command "(New-Object Net.WebClient).DownloadFile('http://www.web2py.com/examples/static/web2py_src.zip', 'C:\web2py_src.zip')"

  11. Extract Downloaded Web2py Source Code
    "C:\Program Files\7-Zip\7z" x C:\web2py_src.zip -oC:\ -r

  12. Set Path Variables
    setx Path "%PATH%;C:\Python27\Scripts;C:\Python27\;C:\Program Files\Graphviz2.38\bin"

  13. Remove Examples Apps
    PowerShell Remove-Item C:\web2py\applications\examples -force -recurse

  14. Create Web2py Profiler Directory
    mkdir C:\profiler

  15. Start Web2py with Profiling Support
    python C:\web2py\web2py.py -i 0.0.0.0 -p 8000 -a password -F C:\profiler

  16. Open another Command Prompt

  17. Delete all files on profiler folders
    PowerShell Remove-Item C:\profiler\* -force -recurse

  18. Open your Browser and access the function on controller file that want to measured
    "C:\Program Files\Mozilla Firefox\firefox.exe" http://127.0.0.1:8000/welcome/default/index

  19. Check the biggest filesize on profiler folder
    dir C:\profiler /OS

  20. Run snakeviz for the biggest filesize on profiler folder
    snakeviz C:\profiler\req_496ef9c6-8a31-4ec4-888f-801c1aadb62e.prof

  21. Check on the function controller on the browser

Related slices

Comments (0)


Hosting graciously provided by:
Python Anywhere