Welcome to mirror list, hosted at ThFree Co, Russian Federation.

generate_profile.rb « script « cloud_profiler_agent « gems « vendor - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d31c8415186b0d28f981920fb9c9a6ec7d8999ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env ruby
# frozen_string_literal: true

require 'prime'
require 'stackprof'

StackProf.run(mode: :cpu, raw: true, interval: 100, out: 'spec/cloud_profiler_agent/cpu.stackprof') do
  (1..1000).each { |i| Prime.prime_division(i) }
end

StackProf.run(mode: :wall, raw: true, interval: 100, out: 'spec/cloud_profiler_agent/wall.stackprof') do
  sleep(1)
end

StackProf.run(mode: :object, raw: true, interval: 100, out: 'spec/cloud_profiler_agent/object.stackprof') do
  (1..1000).each { |i| Prime.prime_division(i) }
end