Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 2 contributors
Showing with 73 additions and 26 deletions.
  1. +11 −3 stats/database_setup.sql
  2. +62 −23 stats/inject.sql
View
14 stats/database_setup.sql
@@ -3,7 +3,7 @@
-- Handshake data
CREATE TABLE handshakes (
- framework VARCHAR(20),
+ framework VARCHAR(30),
timestamp BIGINT,
elapsed BIGINT
);
@@ -20,7 +20,7 @@ CREATE OR REPLACE VIEW handshakes_skew AS
FROM handshakes l INNER JOIN handshakes_min lm ON (l.framework = lm.framework);
CREATE TABLE latencies (
- framework VARCHAR(20),
+ framework VARCHAR(30),
timestamp BIGINT,
elapsed BIGINT
);
@@ -42,8 +42,16 @@ CREATE VIEW latencies_sample AS
WHERE random() < 0.01;
CREATE TABLE latencies_small (
- framework VARCHAR(20),
+ framework VARCHAR(30),
timestamp BIGINT,
elapsed BIGINT
);
+CREATE TABLE events (
+ timestamp BIGINT,
+ framework VARCHAR(30),
+ client_id VARCHAR(20),
+ event_key VARCHAR(20),
+ event_data TEXT
+);
+
View
85 stats/inject.sql
@@ -1,37 +1,76 @@
\c wsdemo
--- Copy all handshake data into the PostgreSQL database
--- Handshake times
-\COPY handshakes FROM '../data/erlang-cowboy/handshake_times.csv' WITH CSV HEADER
-\COPY handshakes FROM '../data/go-websockets/handshake_times.csv' WITH CSV HEADER
-\COPY handshakes FROM '../data/haskell-snap/handshake_times.csv' WITH CSV HEADER
-\COPY handshakes FROM '../data/java-webbit/handshake_times.csv' WITH CSV HEADER
-\COPY handshakes FROM '../data/node-websocket/handshake_times.csv' WITH CSV HEADER
-\COPY handshakes FROM '../data/node-ws/handshake_times.csv' WITH CSV HEADER
-\COPY handshakes FROM '../data/perl-ev/handshake_times.csv' WITH CSV HEADER
-\COPY handshakes FROM '../data/python-tornado/handshake_times.csv' WITH CSV HEADER
-\COPY handshakes FROM '../data/python-ws4py/handshake_times.csv' WITH CSV HEADER
-\COPY handshakes FROM '../data/ruby-em-websockets/handshake_times.csv' WITH CSV HEADER
+-- Copy all data into pg
+
+-- Events
+\COPY events FROM '../data/vagrant-c1k/clojure-aleph/events.csv' WITH CSV HEADER
+\COPY events FROM '../data/vagrant-c1k/erlang-cowboy/events.csv' WITH CSV HEADER
+\COPY events FROM '../data/vagrant-c1k/go-gonet/events.csv' WITH CSV HEADER
+\COPY events FROM '../data/vagrant-c1k/haskell-snap/events.csv' WITH CSV HEADER
+\COPY events FROM '../data/vagrant-c1k/java-webbit/events.csv' WITH CSV HEADER
+\COPY events FROM '../data/vagrant-c1k/node-ws/events.csv' WITH CSV HEADER
+\COPY events FROM '../data/vagrant-c1k/node-ws-cluster/events.csv' WITH CSV HEADER
+\COPY events FROM '../data/vagrant-c1k/perl-ev/events.csv' WITH CSV HEADER
+\COPY events FROM '../data/vagrant-c1k/pypy-tornado-1/events.csv' WITH CSV HEADER
+\COPY events FROM '../data/vagrant-c1k/pypy-tornado-N/events.csv' WITH CSV HEADER
+\COPY events FROM '../data/vagrant-c1k/pypy-twisted-1/events.csv' WITH CSV HEADER
+\COPY events FROM '../data/vagrant-c1k/pypy-twisted-N/events.csv' WITH CSV HEADER
+\COPY events FROM '../data/vagrant-c1k/python-tornado-1/events.csv' WITH CSV HEADER
+\COPY events FROM '../data/vagrant-c1k/python-tornado-N/events.csv' WITH CSV HEADER
+\COPY events FROM '../data/vagrant-c1k/python-twisted-1/events.csv' WITH CSV HEADER
+\COPY events FROM '../data/vagrant-c1k/python-twisted-N/events.csv' WITH CSV HEADER
+\COPY events FROM '../data/vagrant-c1k/python-gevent-websocket-1/events.csv' WITH CSV HEADER
+\COPY events FROM '../data/vagrant-c1k/python-gevent-websocket-N/events.csv' WITH CSV HEADER
-- Latencies
-\COPY latencies FROM '../data/erlang-cowboy/message_latencies.csv' WITH CSV HEADER
-\COPY latencies FROM '../data/go-websockets/message_latencies.csv' WITH CSV HEADER
-\COPY latencies FROM '../data/haskell-snap/message_latencies.csv' WITH CSV HEADER
-\COPY latencies FROM '../data/java-webbit/message_latencies.csv' WITH CSV HEADER
-\COPY latencies FROM '../data/node-websocket/message_latencies.csv' WITH CSV HEADER
-\COPY latencies FROM '../data/node-ws/message_latencies.csv' WITH CSV HEADER
-\COPY latencies FROM '../data/perl-ev/message_latencies.csv' WITH CSV HEADER
-\COPY latencies FROM '../data/python-tornado/message_latencies.csv' WITH CSV HEADER
-\COPY latencies FROM '../data/python-ws4py/message_latencies.csv' WITH CSV HEADER
-\COPY latencies FROM '../data/ruby-em-websockets/message_latencies.csv' WITH CSV HEADER
+\COPY latencies FROM '../data/vagrant-c1k/clojure-aleph/message_latencies.csv' WITH CSV HEADER
+\COPY latencies FROM '../data/vagrant-c1k/erlang-cowboy/message_latencies.csv' WITH CSV HEADER
+\COPY latencies FROM '../data/vagrant-c1k/go-gonet/message_latencies.csv' WITH CSV HEADER
+\COPY latencies FROM '../data/vagrant-c1k/haskell-snap/message_latencies.csv' WITH CSV HEADER
+\COPY latencies FROM '../data/vagrant-c1k/java-webbit/message_latencies.csv' WITH CSV HEADER
+\COPY latencies FROM '../data/vagrant-c1k/node-ws/message_latencies.csv' WITH CSV HEADER
+\COPY latencies FROM '../data/vagrant-c1k/node-ws-cluster/message_latencies.csv' WITH CSV HEADER
+\COPY latencies FROM '../data/vagrant-c1k/perl-ev/message_latencies.csv' WITH CSV HEADER
+\COPY latencies FROM '../data/vagrant-c1k/pypy-tornado-1/message_latencies.csv' WITH CSV HEADER
+\COPY latencies FROM '../data/vagrant-c1k/pypy-tornado-N/message_latencies.csv' WITH CSV HEADER
+\COPY latencies FROM '../data/vagrant-c1k/pypy-twisted-1/message_latencies.csv' WITH CSV HEADER
+\COPY latencies FROM '../data/vagrant-c1k/pypy-twisted-N/message_latencies.csv' WITH CSV HEADER
+\COPY latencies FROM '../data/vagrant-c1k/python-tornado-1/message_latencies.csv' WITH CSV HEADER
+\COPY latencies FROM '../data/vagrant-c1k/python-tornado-N/message_latencies.csv' WITH CSV HEADER
+\COPY latencies FROM '../data/vagrant-c1k/python-twisted-1/message_latencies.csv' WITH CSV HEADER
+\COPY latencies FROM '../data/vagrant-c1k/python-twisted-N/message_latencies.csv' WITH CSV HEADER
+\COPY latencies FROM '../data/vagrant-c1k/python-gevent-websocket-1/message_latencies.csv' WITH CSV HEADER
+\COPY latencies FROM '../data/vagrant-c1k/python-gevent-websocket-N/message_latencies.csv' WITH CSV HEADER
+
+-- Handshakes
+\COPY handshakes FROM '../data/vagrant-c1k/clojure-aleph/handshake_times.csv' WITH CSV HEADER
+\COPY handshakes FROM '../data/vagrant-c1k/erlang-cowboy/handshake_times.csv' WITH CSV HEADER
+\COPY handshakes FROM '../data/vagrant-c1k/go-gonet/handshake_times.csv' WITH CSV HEADER
+\COPY handshakes FROM '../data/vagrant-c1k/haskell-snap/handshake_times.csv' WITH CSV HEADER
+\COPY handshakes FROM '../data/vagrant-c1k/java-webbit/handshake_times.csv' WITH CSV HEADER
+\COPY handshakes FROM '../data/vagrant-c1k/node-ws/handshake_times.csv' WITH CSV HEADER
+\COPY handshakes FROM '../data/vagrant-c1k/node-ws-cluster/handshake_times.csv' WITH CSV HEADER
+\COPY handshakes FROM '../data/vagrant-c1k/perl-ev/handshake_times.csv' WITH CSV HEADER
+\COPY handshakes FROM '../data/vagrant-c1k/pypy-tornado-1/handshake_times.csv' WITH CSV HEADER
+\COPY handshakes FROM '../data/vagrant-c1k/pypy-tornado-N/handshake_times.csv' WITH CSV HEADER
+\COPY handshakes FROM '../data/vagrant-c1k/pypy-twisted-1/handshake_times.csv' WITH CSV HEADER
+\COPY handshakes FROM '../data/vagrant-c1k/pypy-twisted-N/handshake_times.csv' WITH CSV HEADER
+\COPY handshakes FROM '../data/vagrant-c1k/python-tornado-1/handshake_times.csv' WITH CSV HEADER
+\COPY handshakes FROM '../data/vagrant-c1k/python-tornado-N/handshake_times.csv' WITH CSV HEADER
+\COPY handshakes FROM '../data/vagrant-c1k/python-twisted-1/handshake_times.csv' WITH CSV HEADER
+\COPY handshakes FROM '../data/vagrant-c1k/python-twisted-N/handshake_times.csv' WITH CSV HEADER
+\COPY handshakes FROM '../data/vagrant-c1k/python-gevent-websocket-1/handshake_times.csv' WITH CSV HEADER
+\COPY handshakes FROM '../data/vagrant-c1k/python-gevent-websocket-N/handshake_times.csv' WITH CSV HEADER
+
-- Hand the tables a couple of indexes
-- This speeds up queries considerably since there is stuff to hook onto
-- for the query engine.
CREATE INDEX handshakes_ts_idx ON handshakes(timestamp);
CREATE INDEX handshakes_elapsed_idx ON handshakes(elapsed);
+
CREATE INDEX latencies_ts_idx ON latencies(timestamp);
CREATE INDEX latencies_elapsed_idx ON latencies(elapsed);
CREATE INDEX latencies_fwrk ON latencies(framework);
-
+CREATE INDEX events_ts_idx ON events(timestamp);

No commit comments for this range

Something went wrong with that request. Please try again.