-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathRakefile
More file actions
71 lines (57 loc) · 1.46 KB
/
Copy pathRakefile
File metadata and controls
71 lines (57 loc) · 1.46 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
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
# frozen_string_literal: true
require "bundler/gem_helper"
Bundler::GemHelper.install_tasks
require "rake/testtask"
Rake::TestTask.new(:test) do |t, args|
puts args
t.libs << "test"
t.libs << "lib"
t.test_files = FileList["test/**/*_test.rb"]
end
desc "Typecheck with Sorbet"
task :tc do
sh "bundle exec srb tc"
end
# Load rake tasks from lib/tasks
Dir.glob("lib/tasks/*.rake").each { |r| load r }
namespace :benchmark do
def prepare_benchmark
require_relative("./benchmark/run.rb")
end
desc "Benchmark execution"
task :execution do
prepare_benchmark
GraphQLBenchmark.benchmark_execution
end
desc "Benchmark lazy execution"
task :lazy_execution do
prepare_benchmark
GraphQLBenchmark.benchmark_lazy_execution
end
desc "Benchmark introspection"
task :introspection do
prepare_benchmark
GraphQLBenchmark.benchmark_introspection
end
desc "Benchmark GraphQL Ruby resolve_batch against breadth"
task :resolve_batch do
prepare_benchmark
GraphQLBenchmark.benchmark_resolve_batch
end
desc "Benchmark lazy scalar fields"
task :lazy_scalars do
prepare_benchmark
GraphQLBenchmark.benchmark_lazy_scalars
end
desc "Benchmark one lazy scalar field across many objects"
task :resolve_lazy_batch do
prepare_benchmark
GraphQLBenchmark.benchmark_lazy_field_batch
end
desc "Memory profile"
task :memory do
prepare_benchmark
GraphQLBenchmark.memory_profile
end
end
task default: :test