cztop 1.1.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +11 -0
- data/cztop.gemspec +2 -3
- data/lib/cztop/actor.rb +26 -22
- data/lib/cztop/certificate.rb +19 -11
- data/lib/cztop/message.rb +3 -3
- data/lib/cztop/send_receive_methods.rb +35 -6
- data/lib/cztop/socket/types.rb +18 -0
- data/lib/cztop/version.rb +1 -1
- data/lib/cztop/zsock_options.rb +10 -2
- metadata +3 -47
- data/.github/workflows/coverage.yml +0 -20
- data/.github/workflows/draft_api.yml +0 -27
- data/.github/workflows/stable_api.yml +0 -26
- data/.gitignore +0 -10
- data/.projections.json +0 -4
- data/.rspec +0 -2
- data/.rubocop.yml +0 -175
- data/.yardopts +0 -1
- data/Rakefile +0 -6
- data/ci/install-libczmq +0 -22
- data/ci/install-libzmq +0 -22
- data/examples/ruby_actor/actor.rb +0 -100
- data/examples/simple_req_rep/rep.rb +0 -12
- data/examples/simple_req_rep/req.rb +0 -35
- data/examples/taxi_system/.gitignore +0 -2
- data/examples/taxi_system/Makefile +0 -2
- data/examples/taxi_system/README.gsl +0 -115
- data/examples/taxi_system/README.md +0 -276
- data/examples/taxi_system/broker.rb +0 -97
- data/examples/taxi_system/client.rb +0 -34
- data/examples/taxi_system/generate_keys.rb +0 -24
- data/examples/taxi_system/start_broker.sh +0 -2
- data/examples/taxi_system/start_clients.sh +0 -11
- data/examples/weather_pub_sub/pub.rb +0 -24
- data/examples/weather_pub_sub/sub.rb +0 -33
- data/perf/README.md +0 -80
- data/perf/inproc_lat.rb +0 -49
- data/perf/inproc_thru.rb +0 -42
- data/perf/local_lat.rb +0 -35
- data/perf/remote_lat.rb +0 -26
data/perf/local_lat.rb
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
#! /usr/bin/env ruby
|
2
|
-
require "cztop"
|
3
|
-
require "benchmark"
|
4
|
-
|
5
|
-
if ARGV.size != 3
|
6
|
-
abort <<MSG
|
7
|
-
Usage: #{$0} <bind-to> <message-size> <roundtrip-count>
|
8
|
-
MSG
|
9
|
-
end
|
10
|
-
|
11
|
-
ENDPOINT = ARGV[0]
|
12
|
-
MSG_SIZE = Integer(ARGV[1]) # bytes
|
13
|
-
ROUNDTRIP_COUNT = Integer(ARGV[2]) # round trips
|
14
|
-
MSG = "X" * MSG_SIZE
|
15
|
-
|
16
|
-
s = CZTop::Socket::REP.new(ENDPOINT)
|
17
|
-
|
18
|
-
# synchronize
|
19
|
-
s.wait
|
20
|
-
s.signal
|
21
|
-
|
22
|
-
tms = Benchmark.measure do
|
23
|
-
ROUNDTRIP_COUNT.times do
|
24
|
-
msg = s.receive
|
25
|
-
raise "wrong message size" if msg.content_size != MSG_SIZE
|
26
|
-
s << msg
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
elapsed = tms.real
|
31
|
-
latency = elapsed / (ROUNDTRIP_COUNT * 2) * 1_000_000
|
32
|
-
puts "message size: #{MSG_SIZE} [B]"
|
33
|
-
puts "roundtrip count: #{ROUNDTRIP_COUNT}"
|
34
|
-
puts "elapsed time: %.3f [s]" % elapsed
|
35
|
-
puts "average latency: %.3f [us]" % latency
|
data/perf/remote_lat.rb
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
#! /usr/bin/env ruby
|
2
|
-
require "cztop"
|
3
|
-
require "benchmark"
|
4
|
-
|
5
|
-
if ARGV.size != 3
|
6
|
-
abort <<MSG
|
7
|
-
Usage: #{$0} <connect-to> <message-size> <roundtrip-count>
|
8
|
-
MSG
|
9
|
-
end
|
10
|
-
|
11
|
-
ENDPOINT = ARGV[0]
|
12
|
-
MSG_SIZE = Integer(ARGV[1]) # bytes
|
13
|
-
ROUNDTRIP_COUNT = Integer(ARGV[2]) # round trips
|
14
|
-
MSG = "X" * MSG_SIZE
|
15
|
-
|
16
|
-
s = CZTop::Socket::REQ.new(ENDPOINT)
|
17
|
-
|
18
|
-
# synchronize
|
19
|
-
s.signal
|
20
|
-
s.wait
|
21
|
-
|
22
|
-
ROUNDTRIP_COUNT.times do
|
23
|
-
s << MSG
|
24
|
-
msg = s.receive
|
25
|
-
raise "wrong message size" if msg.content_size != MSG_SIZE
|
26
|
-
end
|