Add profiling
parent
c5e5913b4c
commit
70c701a00f
@ -1,12 +1,16 @@
|
|||||||
import pyreactor, time
|
import pyreactor, time
|
||||||
from testclient import TestClient
|
from testclient import TestClient
|
||||||
|
import cProfile as profile
|
||||||
|
|
||||||
s = pyreactor.Server("127.0.0.1", 4006, TestClient)
|
def main():
|
||||||
c = TestClient(host="127.0.0.1", port=4006)
|
s = pyreactor.Server("127.0.0.1", 4006, TestClient)
|
||||||
|
c = TestClient(host="127.0.0.1", port=4006)
|
||||||
|
|
||||||
c.send({"test": "just sending some test data...", "number": 41, "file": open("testdata.dat", "rb")})
|
c.send({"test": "just sending some test data...", "number": 41, "file": open("testdata.dat", "rb")})
|
||||||
|
|
||||||
reactor = pyreactor.Reactor()
|
reactor = pyreactor.Reactor()
|
||||||
reactor.add(s)
|
reactor.add(s)
|
||||||
reactor.add(c)
|
reactor.add(c)
|
||||||
reactor.loop()
|
reactor.loop()
|
||||||
|
|
||||||
|
profile.run("main()")
|
||||||
|
Loading…
Reference in New Issue