From 44be832c5708baadd146cb954befbc3dcad8d463 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Tue, 11 Nov 2014 11:52:45 -0500 Subject: prepare for upgrade to new upstream --- examples/heartbeat/pong.py | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 examples/heartbeat/pong.py (limited to 'examples/heartbeat/pong.py') diff --git a/examples/heartbeat/pong.py b/examples/heartbeat/pong.py deleted file mode 100644 index 47efb3a..0000000 --- a/examples/heartbeat/pong.py +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env python -"""This launches an echoing rep socket device using -zmq.devices.ThreadDevice, and runs a blocking numpy action. -The rep socket should remain responsive to pings during this time. - -Use ping.py to see how responsive it is. - -Authors -------- -* MinRK -""" - -import time -import numpy -import zmq -from zmq import devices - -ctx = zmq.Context() - -dev = devices.ThreadDevice(zmq.FORWARDER, zmq.REP, -1) -dev.bind_in('tcp://127.0.0.1:10111') -dev.setsockopt_in(zmq.IDENTITY, "whoda") -dev.start() - -#wait for connections -time.sleep(1) - -A = numpy.random.random((2**11,2**12)) -print "starting blocking loop" -while True: - tic = time.time() - numpy.dot(A,A.transpose()) - print "blocked for %.3f s"%(time.time()-tic) - -- cgit v1.2.3