Forgot to add changes in prevois commit.
[cl-zmq.git] / perf / remote-thr.lisp
bloba71e17aa56c6a050ee7d0c3419f959109ec776a9
1 ;; Copyright (c) 2009, 2010 Vitaly Mayatskikh <v.mayatskih@gmail.com>
2 ;;
3 ;; This file is part of CL-ZMQ.
4 ;;
5 ;; Vitaly Mayatskikh grants you the rights to distribute
6 ;; and use this software as governed by the terms
7 ;; of the Lisp Lesser GNU Public License
8 ;; (http://opensource.franz.com/preamble.html),
9 ;; known as the LLGPL.
11 (asdf:oos 'asdf:load-op :zeromq)
13 (defpackage :zeromq-test
14 (:use :cl))
16 (in-package :zeromq-test)
18 (load "thr-parms")
19 (load "helpers")
21 (zmq::with-context (ctx 1)
22 (zmq:with-socket (s ctx zmq:pub)
23 (zmq:setsockopt s zmq:rate *rate*)
24 (zmq:connect s *connect-address*)
25 (let ((msg (make-instance 'zmq:msg)))
26 (dotimes (i *message-count*)
27 (zmq:msg-init-size msg *message-size*)
28 (zmq:send s msg)
29 (zmq:msg-close msg))
30 (sleep 1))))
32 (tg:gc)
33 #+sbcl (sb-ext:quit)
34 #+clisp (ext:quit)
35 #+ccl (ccl:quit)