<commit_before>
defmodule Phoenix.PubSub.RedisAdapter do

  @behaviour Phoenix.PubSub.Adapter

  alias Phoenix.PubSub.RedisServer

  def start_link(opts \\ []) do
    opts = Application.get_env(:phoenix, :pubsub) |> Dict.merge(opts)
    Phoenix.PubSub.RedisSupervisor.start_link(opts)
  end

  def stop do
    GenServer.call(server_pid, :stop)
  end

  def create(topic),
    do: call({:create, group(topic)})

  def exists?(topic),
    do: call({:exists?, group(topic)})

  def active?(topic),
    do: call({:active?, group(topic)})

  def delete(topic),
    do: call({:delete, group(topic)})

  def subscribe(pid, topic),
    do: call({:subscribe, pid, group(topic)})

  def unsubscribe(pid, topic),
    do: call({:unsubscribe, pid, group(topic)})

  def subscribers(topic),
    do: call({:subscribers, group(topic)})

  def broadcast(topic, message) do
    broadcast_from(:global, topic, message)
  end

  def broadcast_from(from_pid, topic, message) do
    call({:broadcast, from_pid, group(topic), message})
  end

  def list do
    call(:list)
  end

  def server_pid, do: Process.whereis(RedisServer)

  defp call(message) do
    GenServer.call(server_pid, message)
  end

  defp group(topic), do: "phx:#{topic}"

  def go do
    start_link
    broadcast("foo", 'bar')
    broadcast("foo", "bar")
  end
end<commit_msg>Remove debug code<commit_after>
defmodule Phoenix.PubSub.RedisAdapter do

  @behaviour Phoenix.PubSub.Adapter

  alias Phoenix.PubSub.RedisServer

  def start_link(opts \\ []) do
    opts = Application.get_env(:phoenix, :pubsub) |> Dict.merge(opts)
    Phoenix.PubSub.RedisSupervisor.start_link(opts)
  end

  def stop do
    GenServer.call(server_pid, :stop)
  end

  def create(topic),
    do: call({:create, group(topic)})

  def exists?(topic),
    do: call({:exists?, group(topic)})

  def active?(topic),
    do: call({:active?, group(topic)})

  def delete(topic),
    do: call({:delete, group(topic)})

  def subscribe(pid, topic),
    do: call({:subscribe, pid, group(topic)})

  def unsubscribe(pid, topic),
    do: call({:unsubscribe, pid, group(topic)})

  def subscribers(topic),
    do: call({:subscribers, group(topic)})

  def broadcast(topic, message) do
    broadcast_from(:global, topic, message)
  end

  def broadcast_from(from_pid, topic, message) do
    call({:broadcast, from_pid, group(topic), message})
  end

  def list do
    call(:list)
  end

  def server_pid, do: Process.whereis(RedisServer)

  defp call(message) do
    GenServer.call(server_pid, message)
  end

  defp group(topic), do: "phx:#{topic}"
end
{'fraction_non_alphanumeric': 0.14274570982839313, 'fraction_numerical': 0.0, 'mean_word_length': 4.079207920792079, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6020339', 'n_tokens_mistral': 917, 'n_tokens_neox': 873, 'n_words': 210}