summaryrefslogtreecommitdiff
path: root/exe
diff options
context:
space:
mode:
authormo khan <mokhan@users.noreply.github.com>2019-04-20 09:32:24 -0600
committerGitHub <noreply@github.com>2019-04-20 09:32:24 -0600
commitbc2274ce4183bee7523665bf8a905a584f20081a (patch)
treeb336f1e4c305a3d22a2177b5b8e14f2b68989348 /exe
parenta7cd8453ab61f3a7b6ab59cda9d051dc725cdead (diff)
parent85bd0e5d520109f29011f6eff69e9d2f2e20af26 (diff)
Merge pull request #2 from mokhan/kafkamain
Kafka
Diffstat (limited to 'exe')
-rwxr-xr-xexe/killjoy2
-rwxr-xr-xexe/killjoy-publisher3
-rwxr-xr-xexe/killjoy-timing6
3 files changed, 9 insertions, 2 deletions
diff --git a/exe/killjoy b/exe/killjoy
index c22e9e9..902bdb0 100755
--- a/exe/killjoy
+++ b/exe/killjoy
@@ -12,7 +12,7 @@ server = ServerEngine::Daemon.new(Killjoy::Server, Killjoy::Worker, {}) do
pid_path: 'tmp/killjoy.pid',
queue_shards: configuration.shards,
worker_type: 'process',
- workers: configuration.shards,
+ workers: 1, # configuration.shards,
}
end
server.run
diff --git a/exe/killjoy-publisher b/exe/killjoy-publisher
index 3d50a56..a969835 100755
--- a/exe/killjoy-publisher
+++ b/exe/killjoy-publisher
@@ -7,7 +7,8 @@ require "killjoy"
log_file = ENV.fetch("LOG_FILE", "spec/fixtures/nginx.log")
parser = Killjoy::LogParser.new
-message_bus = Killjoy::MessageBus.new
+#message_bus = Killjoy::MessageBus.new
+message_bus = Killjoy::Kafka::MessageBus.new
Killjoy::Publisher.using(message_bus) do |publisher|
log_file = File.join(Dir.pwd, log_file)
lines = File.readlines(log_file)
diff --git a/exe/killjoy-timing b/exe/killjoy-timing
index bb48b60..6764710 100755
--- a/exe/killjoy-timing
+++ b/exe/killjoy-timing
@@ -25,6 +25,12 @@ Benchmark.ips do |x|
x.report("mongo: writes") do
experiments.mongo_writes
end
+ x.report("kafka-mongo: writes") do
+ experiments.kafka_mongo_writes
+ end
+ x.report("kafka-cassandra: non blocking writes") do
+ experiments.kafka_cassandra_non_blocking_writes
+ end
x.compare!
end