diff options
author | Micah Anderson <micah@riseup.net> | 2014-11-11 11:52:45 -0500 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2014-11-11 11:52:45 -0500 |
commit | 44be832c5708baadd146cb954befbc3dcad8d463 (patch) | |
tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /examples/heartbeat/heart.py | |
parent | 76755110103988258ec37afbb4c022f7ac3ddf54 (diff) |
prepare for upgrade to new upstream
Diffstat (limited to 'examples/heartbeat/heart.py')
-rw-r--r-- | examples/heartbeat/heart.py | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/examples/heartbeat/heart.py b/examples/heartbeat/heart.py deleted file mode 100644 index 175370e..0000000 --- a/examples/heartbeat/heart.py +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env python -"""This launches an echoing rep socket device, -and runs a blocking numpy action. The rep socket should -remain responsive to pings during this time. Use heartbeater.py to -ping this heart, and see the responsiveness. - -Authors -------- -* MinRK -""" - -import time -import numpy -import zmq -from zmq import devices - -ctx = zmq.Context() - -dev = devices.ThreadDevice(zmq.FORWARDER, zmq.SUB, zmq.DEALER) -dev.setsockopt_in(zmq.SUBSCRIBE, "") -dev.connect_in('tcp://127.0.0.1:5555') -dev.connect_out('tcp://127.0.0.1:5556') -dev.start() - -#wait for connections -time.sleep(1) - -A = numpy.random.random((2**11,2**11)) -print "starting blocking loop" -while True: - tic = time.time() - numpy.dot(A,A.transpose()) - print "blocked for %.3f s"%(time.time()-tic) - |