项目作者: bkzhang

项目描述 :
Benchmarking multiple elixir processes with http requests for learning purposes.
高级语言: Elixir
项目地址: git://github.com/bkzhang/ElixirOC.git
创建时间: 2017-05-03T04:33:42Z
项目社区:https://github.com/bkzhang/ElixirOC

开源协议:

下载


ElixirOC

Just tinkering around with basic Elixir, Mix and Ottawa’s OCTranspo’s API for learning purposes.

Running locally:

  1. mix deps.get
  2. touch config/dev.exs
  3. touch config/test.exs

In your config/dev.exs and config/test.exs:

  1. use Mix.Config
  2. config :elixirOC, appID: "<OCTranspo appID>"
  3. config :elixirOC, apikey: "<OCTranspo apikey>"

To view the docs:

  1. mix docs

then open doc/index.html

Example use:

  1. iex -S mix
  2. iex(1)> routes = [{3352, 80}, 3060]
  3. [{3352, 80}, 3060]
  4. iex(2)> ElixirOC.bus_routes_list(routes)
  5. :ok
  6. %{3060 => %{16 => "Britannia", 61 => "Terry Fox", 62 => "Stittsville",
  7. 86 => "Baseline Colonnade", 87 => "Baseline", 94 => "Millennium",
  8. 95 => "Barrhaven Centre", 97 => "Bayshore", 98 => "Tunney's Pasture",
  9. 107 => "South Keys", 403 => "Scotiabank Place", 750 => "Greenboro"},
  10. 7659 => %{1 => "Ottawa-Rockcliffe"}}

Benchmark tests takes in an integer parameter (how many requests you want to make). Example:
benchmark