diff options
Diffstat (limited to 'perf')
-rw-r--r-- | perf/Makefile.am | 2 | ||||
-rw-r--r-- | perf/cl/Makefile.am | 2 | ||||
-rw-r--r-- | perf/cl/lat-parms.lisp | 22 | ||||
-rw-r--r-- | perf/cl/local-lat-poll.lisp | 43 | ||||
-rw-r--r-- | perf/cl/local-lat.lisp | 52 | ||||
-rw-r--r-- | perf/cl/local-thr.lisp | 54 | ||||
-rw-r--r-- | perf/cl/remote-lat.lisp | 50 | ||||
-rw-r--r-- | perf/cl/remote-thr.lisp | 41 | ||||
-rw-r--r-- | perf/cl/thr-parms.lisp | 25 |
9 files changed, 1 insertions, 290 deletions
diff --git a/perf/Makefile.am b/perf/Makefile.am index 3cd29ff..a3c13ad 100644 --- a/perf/Makefile.am +++ b/perf/Makefile.am @@ -20,4 +20,4 @@ endif SUBDIRS = $(PERF_DIR_C) $(PERF_DIR_CPP) $(PERF_DIR_P) \ $(PERF_DIR_J) $(PERF_DIR_R) -DIST_SUBDIRS = c cpp python java ruby cl +DIST_SUBDIRS = c cpp python java ruby diff --git a/perf/cl/Makefile.am b/perf/cl/Makefile.am deleted file mode 100644 index 72d2663..0000000 --- a/perf/cl/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -dist_noinst_CL = local-lat.lisp local-lat-poll.lisp remote-lat.lisp \ -lat-parms.lisp local-thr.lisp remote-thr.lisp thr-params.lisp diff --git a/perf/cl/lat-parms.lisp b/perf/cl/lat-parms.lisp deleted file mode 100644 index d821237..0000000 --- a/perf/cl/lat-parms.lisp +++ /dev/null @@ -1,22 +0,0 @@ -;; Copyright (c) 2009 Vitaly Mayatskikh <v.mayatskih@gmail.com> -;; -;; This file is part of 0MQ. -;; -;; 0MQ is free software; you can redistribute it and/or modify it under -;; the terms of the Lesser GNU General Public License as published by -;; the Free Software Foundation; either version 3 of the License, or -;; (at your option) any later version. -;; -;; 0MQ is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; Lesser GNU General Public License for more details. -;; -;; You should have received a copy of the Lesser GNU General Public License -;; along with this program. If not, see <http://www.gnu.org/licenses/>. - -(in-package :zeromq-test) - -(defvar *address* "tcp://127.0.0.1:5555/") -(defvar *roundtrip-count* 1000) -(defvar *message-size* 32) diff --git a/perf/cl/local-lat-poll.lisp b/perf/cl/local-lat-poll.lisp deleted file mode 100644 index 4fea85e..0000000 --- a/perf/cl/local-lat-poll.lisp +++ /dev/null @@ -1,43 +0,0 @@ -;; Copyright (c) 2009 Vitaly Mayatskikh <v.mayatskih@gmail.com> -;; -;; This file is part of 0MQ. -;; -;; 0MQ is free software; you can redistribute it and/or modify it under -;; the terms of the Lesser GNU General Public License as published by -;; the Free Software Foundation; either version 3 of the License, or -;; (at your option) any later version. -;; -;; 0MQ is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; Lesser GNU General Public License for more details. -;; -;; You should have received a copy of the Lesser GNU General Public License -;; along with this program. If not, see <http://www.gnu.org/licenses/>. - -(asdf:oos 'asdf:load-op :zeromq) - -(defpackage :zeromq-test - (:use :cl)) - -(in-package :zeromq-test) - -(load "lat-parms") - -(zmq:with-context (ctx 1 1 zmq:poll) - (zmq:with-socket (s ctx zmq:rep) - (zmq:bind s *address*) - (let ((msg (make-instance 'zmq:msg))) - (zmq:with-polls ((poll-in . ((s . zmq:pollin))) - (poll-out . ((s . zmq:pollout)))) - (dotimes (i *roundtrip-count*) - (zmq:poll poll-in) - (zmq:recv s msg zmq:noblock) - (zmq:poll poll-out) - (zmq:send s msg zmq:noblock)))))) - -(tg:gc) -#+sbcl (sb-ext:quit) -#+clisp (ext:quit) - -; diff --git a/perf/cl/local-lat.lisp b/perf/cl/local-lat.lisp deleted file mode 100644 index 7de16a6..0000000 --- a/perf/cl/local-lat.lisp +++ /dev/null @@ -1,52 +0,0 @@ -;; Copyright (c) 2009 Vitaly Mayatskikh <v.mayatskih@gmail.com> -;; -;; This file is part of 0MQ. -;; -;; 0MQ is free software; you can redistribute it and/or modify it under -;; the terms of the Lesser GNU General Public License as published by -;; the Free Software Foundation; either version 3 of the License, or -;; (at your option) any later version. -;; -;; 0MQ is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; Lesser GNU General Public License for more details. -;; -;; You should have received a copy of the Lesser GNU General Public License -;; along with this program. If not, see <http://www.gnu.org/licenses/>. - -(asdf:oos 'asdf:load-op :zeromq) - -(defpackage :zeromq-test - (:use :cl)) - -(in-package :zeromq-test) - -(load "lat-parms") - -(zmq:with-context (ctx 1 1) - (zmq:with-socket (s ctx zmq:rep) - (zmq:bind s *address*) - (let ((msg (make-instance 'zmq:msg))) - (dotimes (i *roundtrip-count*) -;; non-blocking recv - #+nil - (tagbody retry - (handler-case - (progn - (zmq:recv s msg zmq:noblock) - (format t "size ~d, ~a~%" (zmq:msg-size msg) (zmq:msg-data-as-array msg))) - (zmq:error-again (c) - (declare (ignore c)) - (sleep 0.01) - (go retry)))) -;; blocking recv - (zmq:recv s msg) - (zmq:send s msg))) - (zmq:sleep 1))) - -(tg:gc) -#+sbcl (sb-ext:quit) -#+clisp (ext:quit) - -; diff --git a/perf/cl/local-thr.lisp b/perf/cl/local-thr.lisp deleted file mode 100644 index 0944364..0000000 --- a/perf/cl/local-thr.lisp +++ /dev/null @@ -1,54 +0,0 @@ -;; Copyright (c) 2009 Vitaly Mayatskikh <v.mayatskih@gmail.com> -;; -;; This file is part of 0MQ. -;; -;; 0MQ is free software; you can redistribute it and/or modify it under -;; the terms of the Lesser GNU General Public License as published by -;; the Free Software Foundation; either version 3 of the License, or -;; (at your option) any later version. -;; -;; 0MQ is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; Lesser GNU General Public License for more details. -;; -;; You should have received a copy of the Lesser GNU General Public License -;; along with this program. If not, see <http://www.gnu.org/licenses/>. - -(asdf:oos 'asdf:load-op :zeromq) - -(defpackage :zeromq-test - (:use :cl)) - -(in-package :zeromq-test) - -(load "thr-parms") - -(defvar *elapsed* nil) -(defvar *throughput* nil) -(defvar *megabits* nil) - -(zmq::with-context (ctx 1 1) - (zmq:with-socket (s ctx zmq:sub) - (zmq:setsockopt s zmq:subscribe "") - (zmq:setsockopt s zmq:rate *rate*) - (zmq:bind s *bind-address*) - (let ((msg (make-instance 'zmq:msg))) - (zmq:recv s msg) - (setf *elapsed* - (zmq:with-stopwatch - (dotimes (i (1- *message-count*)) - (zmq:recv s msg)))))) - (setq *throughput* (* (/ *message-count* *elapsed*) 1e6) - *megabits* (/ (* *throughput* *message-count* 8) 1e6)) - - (format t "message size: ~d [B]~%" *message-size*) - (format t "message count: ~d~%" *message-count*) - (format t "mean throughput: ~d [msg/s]~%" (round *throughput*)) - (format t "mean throughput: ~,3f [Mb/s]~%" *megabits*)) - -(tg:gc) -#+sbcl (sb-ext:quit) -#+clisp (ext:quit) - -; diff --git a/perf/cl/remote-lat.lisp b/perf/cl/remote-lat.lisp deleted file mode 100644 index c0f0d8a..0000000 --- a/perf/cl/remote-lat.lisp +++ /dev/null @@ -1,50 +0,0 @@ -;; Copyright (c) 2009 Vitaly Mayatskikh <v.mayatskih@gmail.com> -;; -;; This file is part of 0MQ. -;; -;; 0MQ is free software; you can redistribute it and/or modify it under -;; the terms of the Lesser GNU General Public License as published by -;; the Free Software Foundation; either version 3 of the License, or -;; (at your option) any later version. -;; -;; 0MQ is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; Lesser GNU General Public License for more details. -;; -;; You should have received a copy of the Lesser GNU General Public License -;; along with this program. If not, see <http://www.gnu.org/licenses/>. - -(asdf:oos 'asdf:load-op :zeromq) - -(defpackage :zeromq-test - (:use :cl)) - -(in-package :zeromq-test) - -(load "lat-parms") - -(defvar *elapsed* nil) -(defvar *latency* nil) - -(zmq::with-context (ctx 1 1) - (zmq:with-socket (s ctx zmq:req) - (zmq:connect s *address*) - (let ((msg (make-instance 'zmq:msg :size *message-size*))) - (setf *elapsed* - (zmq:with-stopwatch - (dotimes (i *roundtrip-count*) - (zmq:send s msg) - (zmq:recv s msg))))) - (zmq:sleep 1))) - -(setf *latency* (/ *elapsed* (* 2 *roundtrip-count*))) - -(format t "message size: ~d [B]~%" *message-size*) -(format t "roundtrip count: ~d~%" *roundtrip-count*) -(format t "average latency: ~f [us]~%" *latency*) - -(tg:gc) -#+sbcl (sb-ext:quit) -#+clisp (ext:quit) -; diff --git a/perf/cl/remote-thr.lisp b/perf/cl/remote-thr.lisp deleted file mode 100644 index c50170e..0000000 --- a/perf/cl/remote-thr.lisp +++ /dev/null @@ -1,41 +0,0 @@ -;; Copyright (c) 2009 Vitaly Mayatskikh <v.mayatskih@gmail.com> -;; -;; This file is part of 0MQ. -;; -;; 0MQ is free software; you can redistribute it and/or modify it under -;; the terms of the Lesser GNU General Public License as published by -;; the Free Software Foundation; either version 3 of the License, or -;; (at your option) any later version. -;; -;; 0MQ is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; Lesser GNU General Public License for more details. -;; -;; You should have received a copy of the Lesser GNU General Public License -;; along with this program. If not, see <http://www.gnu.org/licenses/>. - -(asdf:oos 'asdf:load-op :zeromq) - -(defpackage :zeromq-test - (:use :cl)) - -(in-package :zeromq-test) - -(load "thr-parms") - -(zmq::with-context (ctx 1 1) - (zmq:with-socket (s ctx zmq:pub) - (zmq:setsockopt s zmq:rate *rate*) - (zmq:connect s *connect-address*) - (let ((msg (make-instance 'zmq:msg))) - (dotimes (i *message-count*) - (zmq:msg-init-size msg *message-size*) - (zmq:send s msg) - (zmq:msg-close msg)) - (zmq:sleep 10)))) - -(tg:gc) -#+sbcl (sb-ext:quit) -#+clisp (ext:quit) -; diff --git a/perf/cl/thr-parms.lisp b/perf/cl/thr-parms.lisp deleted file mode 100644 index e2693e8..0000000 --- a/perf/cl/thr-parms.lisp +++ /dev/null @@ -1,25 +0,0 @@ -;; Copyright (c) 2009 Vitaly Mayatskikh <v.mayatskih@gmail.com> -;; -;; This file is part of 0MQ. -;; -;; 0MQ is free software; you can redistribute it and/or modify it under -;; the terms of the Lesser GNU General Public License as published by -;; the Free Software Foundation; either version 3 of the License, or -;; (at your option) any later version. -;; -;; 0MQ is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; Lesser GNU General Public License for more details. -;; -;; You should have received a copy of the Lesser GNU General Public License -;; along with this program. If not, see <http://www.gnu.org/licenses/>. - -(in-package :zeromq-test) - -;(defvar *address* "pgm://lo;224.0.0.1:8000") -(defvar *bind-address* "tcp://lo:8000") -(defvar *connect-address* "tcp://localhost:8000") -(defvar *message-count* 1000) -(defvar *message-size* 256) -(defvar *rate* 256) |