summaryrefslogtreecommitdiff
path: root/doc/core/benchmarks/tpserver.py
diff options
context:
space:
mode:
Diffstat (limited to 'doc/core/benchmarks/tpserver.py')
-rw-r--r--doc/core/benchmarks/tpserver.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/core/benchmarks/tpserver.py b/doc/core/benchmarks/tpserver.py
new file mode 100644
index 0000000..49024e1
--- /dev/null
+++ b/doc/core/benchmarks/tpserver.py
@@ -0,0 +1,19 @@
+"""Throughput server."""
+
+import sys
+
+from twisted.protocols.wire import Discard
+from twisted.internet import protocol, reactor
+from twisted.python import log
+
+
+def main():
+ f = protocol.ServerFactory()
+ f.protocol = Discard
+ reactor.listenTCP(8000, f)
+ reactor.run()
+
+
+if __name__ == '__main__':
+ main()
+