Can I slow down Django

前端 未结 6 606
轻奢々
轻奢々 2021-02-05 10:12

Simple question really

./manage.py runserver

Can I slow down localhost:8000 on my development machine so I can simulate file uploa

6条回答
  •  既然无缘
    2021-02-05 11:01

    On osx or freebds, you can use ipfw to limit bandwidth on specific ports:

      sudo ipfw pipe 1 config bw 1Bytes/s delay 100ms
      sudo ipfw add 1 pipe 1 src-port 8000
    

    Do not forget to delete it when you do not need it anymore:

    sudo ipfw delete 1
    

    Credit: jaguarcy

    For osx there is also free app that will allow this:

    http://slowyapp.com/

提交回复
热议问题