-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathbenchmark.exs
More file actions
37 lines (33 loc) · 1.18 KB
/
benchmark.exs
File metadata and controls
37 lines (33 loc) · 1.18 KB
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
# MIX_ENV=test mix run ./script/benchmark.exs
import PackmaticTest.Builder
Incendium.run(%{
"Random Small" => fn ->
{:ok, file_path} = Briefly.create()
[
[source: {:random, 8 * 1048576}, path: "1"],
[source: {:random, 8 * 1048576}, path: "2"],
[source: {:random, 8 * 1048576}, path: "3"]
]
|> Packmatic.Manifest.create()
|> Packmatic.build_stream()
|> Stream.into(File.stream!(file_path, [:write]))
|> Stream.run()
end,
"Deflate and Store" => fn ->
{:ok, file_path} = Briefly.create()
[
[source: build_file_source(), path: "1", method: :deflate],
[source: build_file_source(), path: "2", method: :store],
[source: build_file_source(), path: "3", method: {:deflate, level: :best_compression}],
[source: build_file_source(), path: "4", method: :store],
[source: build_file_source(), path: "5", method: {:deflate, level: :best_speed}]
]
|> Packmatic.Manifest.create()
|> Packmatic.build_stream()
|> Stream.into(File.stream!(file_path, [:write]))
|> Stream.run()
end
},
title: "Packmatic",
incendium_flamegraph_widths_to_scale: true
)