Sha256: 4d9e57fd3721f2fb1fb9bbc76a5f1296e693458d62bcad1cfba39689ad0821a8

Contents?: true

Size: 593 Bytes

Versions: 15

Compression:

Stored size: 593 Bytes

Contents

CREATE OR REPLACE FUNCTION benchmark_get(
  stream_name varchar,
  cycles int DEFAULT 1000
)
RETURNS void
AS $$
BEGIN
  RAISE NOTICE 'ยป benchmark_get';
  RAISE NOTICE 'stream_name: %', benchmark_get.stream_name;
  RAISE NOTICE 'cycles: %', benchmark_get.cycles;

  FOR i IN 1..cycles LOOP
    IF current_setting('message_store.debug_benchmark', true) = 'on' OR current_setting('message_store.debug', true) = 'on' THEN
      RAISE NOTICE '%', i;
    END IF;

    PERFORM get_stream_messages(stream_name, "position" => i - 1, batch_size => 1);
  END LOOP;
END;
$$ LANGUAGE plpgsql
VOLATILE;



Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
message-db-2.1.6 database/benchmark_get.sql
message-db-2.1.5 database/benchmark_get.sql
message-db-2.1.4 database/benchmark_get.sql
message-db-2.1.3 database/benchmark_get.sql
message-db-2.1.2 database/benchmark_get.sql
message-db-2.1.1 database/benchmark_get.sql
message-db-2.1.0 database/benchmark_get.sql
message-db-2.0.2 database/benchmark_get.sql
message-db-2.0.1 database/benchmark_get.sql
message-db-2.0.0 database/benchmark_get.sql
message-db-1.1.3 database/benchmark_get.sql
message-db-1.1.2 database/benchmark_get.sql
message-db-1.1.1 database/benchmark_get.sql
message-db-1.1.0 database/benchmark_get.sql
message-db-1.0.0 database/benchmark_get.sql