-
Notifications
You must be signed in to change notification settings - Fork 66
/
mix.exs
91 lines (84 loc) · 2.52 KB
/
mix.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
defmodule Benchee.Mixfile do
use Mix.Project
@source_url "https://github.com/bencheeorg/benchee"
@version "1.3.1"
def project do
[
app: :benchee,
version: @version,
elixir: "~> 1.6",
elixirc_paths: elixirc_paths(Mix.env()),
consolidate_protocols: true,
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
deps: deps(),
docs: docs(),
package: package(),
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test,
"coveralls.travis": :test,
"safe_coveralls.travis": :test
],
dialyzer: [
flags: [:underspecs],
plt_file: {:no_warn, "tools/plts/benchee.plt"},
plt_add_apps: [:table]
],
name: "Benchee",
description: """
Versatile (micro) benchmarking that is extensible. Get statistics such as:
average, iterations per second, standard deviation and the median.
"""
]
end
defp elixirc_paths(:test), do: ["lib", "test/support", "mix"]
defp elixirc_paths(_), do: ["lib"]
defp deps do
deps = [
{:deep_merge, "~> 1.0"},
{:statistex, "~> 1.0"},
{:ex_guard, "~> 1.3", only: :dev},
{:credo, "~> 1.7.7-rc.0", only: :dev, runtime: false},
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false},
{:excoveralls, "~> 0.13", only: :test},
{:dialyxir, "~> 1.0", only: :dev, runtime: false},
{:doctest_formatter, "~> 0.2", only: :dev, runtime: false}
]
# table relies on __STACKTRACE__ which was introduced in 1.7, we still support ~>1.6 though
# as it's optional, this does not affect the function of Benchee
if Version.compare(System.version(), "1.7.0") == :gt do
[{:table, "~> 0.1.0", optional: true} | deps]
else
deps
end
end
defp package do
[
maintainers: ["Tobias Pfeiffer", "Devon Estes"],
licenses: ["MIT"],
links: %{
"Changelog" => "https://hexdocs.pm/benchee/changelog.html",
"GitHub" => @source_url,
"Blog posts" => "https://pragtob.wordpress.com/tag/benchee/"
}
]
end
defp docs do
[
extras: [
"CHANGELOG.md": [],
"LICENSE.md": [title: "License"],
"README.md": [title: "Readme"]
],
main: "readme",
source_url: @source_url,
source_ref: @version,
api_reference: false,
skip_undefined_reference_warnings_on: ["CHANGELOG.md"]
]
end
end