Add tests for importers (#56)
This also fixes deep copy import for Instruments when copying from Instruments 7 Related to #14
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
require 'json'
|
||||
require 'stackprof'
|
||||
|
||||
def a
|
||||
for i in 0..100 do
|
||||
b
|
||||
c
|
||||
end
|
||||
end
|
||||
|
||||
def b
|
||||
for i in 0..10
|
||||
d
|
||||
end
|
||||
end
|
||||
|
||||
def c
|
||||
for i in 0..10
|
||||
d
|
||||
end
|
||||
end
|
||||
|
||||
def d
|
||||
prod = 1
|
||||
for i in 1..1000
|
||||
prod *= i
|
||||
end
|
||||
prod
|
||||
end
|
||||
|
||||
profile = StackProf.run(mode: :wall, raw: true) do
|
||||
a
|
||||
end
|
||||
|
||||
puts JSON.generate(profile)
|
||||
Reference in New Issue
Block a user