Rollback commit 9636f4ef1bbedad61e80dd621b800f4bf5a8c30e
[cl-zmq.git] / perf / remote-thr.lisp
blobc50170e90dd81ff31d103c614b12440c7f58ec1d
1 ;; Copyright (c) 2009 Vitaly Mayatskikh <v.mayatskih@gmail.com>
2 ;;
3 ;; This file is part of 0MQ.
4 ;;
5 ;; 0MQ is free software; you can redistribute it and/or modify it under
6 ;; the terms of the Lesser GNU General Public License as published by
7 ;; the Free Software Foundation; either version 3 of the License, or
8 ;; (at your option) any later version.
9 ;;
10 ;; 0MQ is distributed in the hope that it will be useful,
11 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ;; Lesser GNU General Public License for more details.
15 ;; You should have received a copy of the Lesser GNU General Public License
16 ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
18 (asdf:oos 'asdf:load-op :zeromq)
20 (defpackage :zeromq-test
21 (:use :cl))
23 (in-package :zeromq-test)
25 (load "thr-parms")
27 (zmq::with-context (ctx 1 1)
28 (zmq:with-socket (s ctx zmq:pub)
29 (zmq:setsockopt s zmq:rate *rate*)
30 (zmq:connect s *connect-address*)
31 (let ((msg (make-instance 'zmq:msg)))
32 (dotimes (i *message-count*)
33 (zmq:msg-init-size msg *message-size*)
34 (zmq:send s msg)
35 (zmq:msg-close msg))
36 (zmq:sleep 10))))
38 (tg:gc)
39 #+sbcl (sb-ext:quit)
40 #+clisp (ext:quit)