Packages

An application you can use for benchmarking, read terms from a file (or other Producer) and execute them against an anonymous function of your choice

Retired package: failed travis

Current section

Files

Jump to
ex_bench lib ex_bench file_producer line_parser.ex
Raw

lib/ex_bench/file_producer/line_parser.ex

defmodule ExBench.FileProducer.LineParser do
def parse({:ok, line}), do: parse(line)
def parse(line) do
input = :erlang.binary_to_list(line)
{:ok, toks, _} = :erl_scan.string(input)
{:ok, exprs} = :erl_parse.parse_exprs(toks)
{:value, terms, _} = :erl_eval.exprs(exprs, :orddict.new())
terms
end
end