ruby-prof 1.6.3-x64-mingw-ucrt → 1.7.1-x64-mingw-ucrt
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES +11 -0
- data/ext/ruby_prof/rp_allocation.c +342 -342
- data/ext/ruby_prof/rp_call_tree.c +1 -1
- data/ext/ruby_prof/rp_call_tree.h +1 -1
- data/ext/ruby_prof/rp_call_trees.c +2 -2
- data/ext/ruby_prof/rp_call_trees.h +2 -2
- data/ext/ruby_prof/rp_measure_allocations.c +1 -1
- data/ext/ruby_prof/rp_measure_memory.c +46 -46
- data/ext/ruby_prof/rp_measure_process_time.c +1 -1
- data/ext/ruby_prof/rp_measure_wall_time.c +1 -1
- data/ext/ruby_prof/rp_measurement.c +364 -364
- data/ext/ruby_prof/rp_method.c +26 -25
- data/ext/ruby_prof/rp_method.h +5 -2
- data/ext/ruby_prof/rp_profile.c +2 -2
- data/ext/ruby_prof/rp_profile.h +36 -36
- data/ext/ruby_prof/rp_stack.c +1 -1
- data/ext/ruby_prof/rp_thread.c +1 -1
- data/ext/ruby_prof/ruby_prof.c +1 -1
- data/ext/ruby_prof/ruby_prof.h +34 -34
- data/ext/ruby_prof/vc/ruby_prof.vcxproj +5 -7
- data/lib/3.3/ruby_prof.so +0 -0
- data/lib/ruby-prof/compatibility.rb +10 -10
- data/lib/ruby-prof/exclude_common_methods.rb +9 -3
- data/lib/ruby-prof/method_info.rb +87 -85
- data/lib/ruby-prof/version.rb +1 -1
- data/ruby-prof.gemspec +2 -1
- data/test/crash2.rb +144 -0
- data/test/enumerable_test.rb +5 -5
- data/test/exclude_methods_test.rb +197 -86
- data/test/line_number_test.rb +254 -99
- data/test/measure_allocations_test.rb +422 -1
- data/test/measure_memory_test.rb +433 -1
- data/test/measure_process_time_test.rb +882 -15
- data/test/measure_wall_time_test.rb +195 -47
- data/test/method_info_test.rb +1 -1
- data/test/recursive_test.rb +198 -1
- data/test/thread_test.rb +0 -4
- metadata +21 -7
- data/lib/3.1/ruby_prof.so +0 -0
- data/lib/3.2/ruby_prof.so +0 -0
data/test/measure_memory_test.rb
CHANGED
@@ -675,7 +675,7 @@ class MeasureMemoryTest < TestCase
|
|
675
675
|
|
676
676
|
assert_equal(0.0, method.call_trees.callees.length)
|
677
677
|
end
|
678
|
-
|
678
|
+
elsif Gem::Version.new(RUBY_VERSION) < Gem::Version.new('3.3')
|
679
679
|
def test_memory
|
680
680
|
result = RubyProf::Profile.profile(measure_mode: RubyProf::MEMORY) do
|
681
681
|
allocator = Allocator.new
|
@@ -1018,6 +1018,438 @@ class MeasureMemoryTest < TestCase
|
|
1018
1018
|
assert_equal(0.0, call_tree.self_time)
|
1019
1019
|
assert_equal(0.0, call_tree.children_time)
|
1020
1020
|
|
1021
|
+
assert_equal(0.0, method.call_trees.callees.length)
|
1022
|
+
end
|
1023
|
+
else
|
1024
|
+
def test_memory
|
1025
|
+
result = RubyProf::Profile.profile(measure_mode: RubyProf::MEMORY) do
|
1026
|
+
allocator = Allocator.new
|
1027
|
+
allocator.run
|
1028
|
+
end
|
1029
|
+
|
1030
|
+
thread = result.threads.first
|
1031
|
+
|
1032
|
+
assert_in_delta(1640, thread.total_time, 1)
|
1033
|
+
methods = result.threads.first.methods.sort.reverse
|
1034
|
+
assert_equal(17, methods.length)
|
1035
|
+
|
1036
|
+
# Method 0
|
1037
|
+
method = methods[0]
|
1038
|
+
assert_equal('MeasureMemoryTest#test_memory', method.full_name)
|
1039
|
+
assert_in_delta(1640, method.total_time, 1)
|
1040
|
+
|
1041
|
+
assert_equal(0.0, method.wait_time)
|
1042
|
+
assert_equal(0.0, method.self_time)
|
1043
|
+
assert_in_delta(1640, method.children_time, 1)
|
1044
|
+
assert_equal(0, method.call_trees.callers.length)
|
1045
|
+
|
1046
|
+
assert_equal(2, method.call_trees.callees.length)
|
1047
|
+
call_tree = method.call_trees.callees[0]
|
1048
|
+
assert_equal('Class#new', call_tree.target.full_name)
|
1049
|
+
assert_equal(40.0, call_tree.total_time)
|
1050
|
+
assert_equal(0.0, call_tree.wait_time)
|
1051
|
+
assert_equal(40.0, call_tree.self_time)
|
1052
|
+
assert_equal(0.0, call_tree.children_time)
|
1053
|
+
|
1054
|
+
call_tree = method.call_trees.callees[1]
|
1055
|
+
assert_equal('Allocator#run', call_tree.target.full_name)
|
1056
|
+
assert_equal(1600.0, call_tree.total_time)
|
1057
|
+
assert_equal(0.0, call_tree.wait_time)
|
1058
|
+
assert_equal(0.0, call_tree.self_time)
|
1059
|
+
assert_equal(1600.0, call_tree.children_time)
|
1060
|
+
|
1061
|
+
# Method 1
|
1062
|
+
method = methods[1]
|
1063
|
+
assert_equal('Allocator#run',method.full_name)
|
1064
|
+
assert_equal(1600.0, method.total_time)
|
1065
|
+
assert_equal(0.0, method.wait_time)
|
1066
|
+
assert_equal(0.0, method.self_time)
|
1067
|
+
assert_equal(1600.0, method.children_time)
|
1068
|
+
|
1069
|
+
assert_equal(1, method.call_trees.callers.length)
|
1070
|
+
call_tree = method.call_trees.callers[0]
|
1071
|
+
assert_equal('MeasureMemoryTest#test_memory', call_tree.parent.target.full_name)
|
1072
|
+
assert_equal(1600.0, call_tree.total_time)
|
1073
|
+
assert_equal(0.0, call_tree.wait_time)
|
1074
|
+
assert_equal(0.0, call_tree.self_time)
|
1075
|
+
assert_equal(1600.0, call_tree.children_time)
|
1076
|
+
|
1077
|
+
assert_equal(3, method.call_trees.callees.length)
|
1078
|
+
call_tree = method.call_trees.callees[0]
|
1079
|
+
assert_equal('Allocator#make_arrays', call_tree.target.full_name)
|
1080
|
+
assert_equal(400.0, call_tree.total_time)
|
1081
|
+
assert_equal(0.0, call_tree.wait_time)
|
1082
|
+
assert_equal(0.0, call_tree.self_time)
|
1083
|
+
assert_equal(400.0, call_tree.children_time)
|
1084
|
+
|
1085
|
+
call_tree = method.call_trees.callees[1]
|
1086
|
+
assert_equal('Allocator#make_hashes', call_tree.target.full_name)
|
1087
|
+
assert_equal(800.0, call_tree.total_time)
|
1088
|
+
assert_equal(0.0, call_tree.wait_time)
|
1089
|
+
assert_equal(0.0, call_tree.self_time)
|
1090
|
+
assert_equal(800.0, call_tree.children_time)
|
1091
|
+
|
1092
|
+
call_tree = method.call_trees.callees[2]
|
1093
|
+
assert_equal('Allocator#make_strings', call_tree.target.full_name)
|
1094
|
+
assert_equal(400.0, call_tree.total_time)
|
1095
|
+
assert_equal(0.0, call_tree.wait_time)
|
1096
|
+
assert_equal(40.0, call_tree.self_time)
|
1097
|
+
assert_equal(360.0, call_tree.children_time)
|
1098
|
+
|
1099
|
+
# Method 2
|
1100
|
+
method = methods[2]
|
1101
|
+
assert_equal('Class#new', method.full_name)
|
1102
|
+
assert_equal(840.0, method.total_time)
|
1103
|
+
assert_equal(0.0, method.wait_time)
|
1104
|
+
assert_equal(840.0, method.self_time)
|
1105
|
+
assert_equal(0.0, method.children_time)
|
1106
|
+
|
1107
|
+
assert_equal(2, method.call_trees.callers.length)
|
1108
|
+
call_tree = method.call_trees.callers[0]
|
1109
|
+
assert_equal('MeasureMemoryTest#test_memory', call_tree.parent.target.full_name)
|
1110
|
+
assert_equal(40.0, call_tree.total_time)
|
1111
|
+
assert_equal(0.0, call_tree.wait_time)
|
1112
|
+
assert_equal(40.0, call_tree.self_time)
|
1113
|
+
assert_equal(0.0, call_tree.children_time)
|
1114
|
+
|
1115
|
+
call_tree = method.call_trees.callers[1]
|
1116
|
+
assert_equal('Allocator#make_hashes', call_tree.parent.target.full_name)
|
1117
|
+
assert_equal(800.0, call_tree.total_time)
|
1118
|
+
assert_equal(0.0, call_tree.wait_time)
|
1119
|
+
assert_equal(800.0, call_tree.self_time)
|
1120
|
+
assert_equal(0.0, call_tree.children_time)
|
1121
|
+
|
1122
|
+
assert_equal(2, method.call_trees.callees.length)
|
1123
|
+
call_tree = method.call_trees.callees[0]
|
1124
|
+
assert_equal('BasicObject#initialize', call_tree.target.full_name)
|
1125
|
+
assert_equal(0.0, call_tree.total_time)
|
1126
|
+
assert_equal(0.0, call_tree.wait_time)
|
1127
|
+
assert_equal(0.0, call_tree.self_time)
|
1128
|
+
assert_equal(0.0, call_tree.children_time)
|
1129
|
+
|
1130
|
+
call_tree = method.call_trees.callees[1]
|
1131
|
+
assert_equal('Hash#initialize', call_tree.target.full_name)
|
1132
|
+
assert_equal(0.0, call_tree.total_time)
|
1133
|
+
assert_equal(0.0, call_tree.wait_time)
|
1134
|
+
assert_equal(0.0, call_tree.self_time)
|
1135
|
+
assert_equal(0.0, call_tree.children_time)
|
1136
|
+
|
1137
|
+
# Method 3
|
1138
|
+
method = methods[3]
|
1139
|
+
assert_equal('Allocator#make_hashes', method.full_name)
|
1140
|
+
assert_equal(800.0, method.total_time)
|
1141
|
+
assert_equal(0.0, method.wait_time)
|
1142
|
+
assert_equal(0.0, method.self_time)
|
1143
|
+
assert_equal(800.0, method.children_time)
|
1144
|
+
|
1145
|
+
assert_equal(1, method.call_trees.callers.length)
|
1146
|
+
call_tree = method.call_trees.callers[0]
|
1147
|
+
assert_equal('Allocator#run', call_tree.parent.target.full_name)
|
1148
|
+
assert_equal(800.0, call_tree.total_time)
|
1149
|
+
assert_equal(0.0, call_tree.wait_time)
|
1150
|
+
assert_equal(0.0, call_tree.self_time)
|
1151
|
+
assert_equal(800.0, call_tree.children_time)
|
1152
|
+
|
1153
|
+
assert_equal(1, method.call_trees.callees.length)
|
1154
|
+
call_tree = method.call_trees.callees[0]
|
1155
|
+
assert_equal('Class#new', call_tree.target.full_name)
|
1156
|
+
assert_equal(800.0, call_tree.total_time)
|
1157
|
+
assert_equal(0.0, call_tree.wait_time)
|
1158
|
+
assert_equal(800.0, call_tree.self_time)
|
1159
|
+
assert_equal(0.0, call_tree.children_time)
|
1160
|
+
|
1161
|
+
# Method 4
|
1162
|
+
method = methods[4]
|
1163
|
+
assert_equal('Allocator#make_strings', method.full_name)
|
1164
|
+
assert_equal(400.0, method.total_time)
|
1165
|
+
assert_equal(0.0, method.wait_time)
|
1166
|
+
assert_equal(40.0, method.self_time)
|
1167
|
+
assert_equal(360.0, method.children_time)
|
1168
|
+
|
1169
|
+
assert_equal(1, method.call_trees.callers.length)
|
1170
|
+
call_tree = method.call_trees.callers[0]
|
1171
|
+
assert_equal('Allocator#run', call_tree.parent.target.full_name)
|
1172
|
+
assert_equal(400.0, call_tree.total_time)
|
1173
|
+
assert_equal(0.0, call_tree.wait_time)
|
1174
|
+
assert_equal(40.0, call_tree.self_time)
|
1175
|
+
assert_equal(360.0, call_tree.children_time)
|
1176
|
+
|
1177
|
+
assert_equal(2, method.call_trees.callees.length)
|
1178
|
+
call_tree = method.call_trees.callees[0]
|
1179
|
+
assert_equal('String#*', call_tree.target.full_name)
|
1180
|
+
assert_equal(160.0, call_tree.total_time)
|
1181
|
+
assert_equal(0.0, call_tree.wait_time)
|
1182
|
+
assert_equal(160.0, call_tree.self_time)
|
1183
|
+
assert_equal(0.0, call_tree.children_time)
|
1184
|
+
|
1185
|
+
call_tree = method.call_trees.callees[1]
|
1186
|
+
assert_equal('<Class::String>#new', call_tree.target.full_name)
|
1187
|
+
assert_equal(200.0, call_tree.total_time)
|
1188
|
+
assert_equal(0.0, call_tree.wait_time)
|
1189
|
+
assert_equal(40.0, call_tree.self_time)
|
1190
|
+
assert_equal(160.0, call_tree.children_time)
|
1191
|
+
|
1192
|
+
# Method 5
|
1193
|
+
method = methods[5]
|
1194
|
+
assert_equal('Allocator#make_arrays', method.full_name)
|
1195
|
+
assert_equal(400.0, method.total_time)
|
1196
|
+
assert_equal(0.0, method.wait_time)
|
1197
|
+
assert_equal(0.0, method.self_time)
|
1198
|
+
assert_equal(400.0, method.children_time)
|
1199
|
+
|
1200
|
+
assert_equal(1, method.call_trees.callers.length)
|
1201
|
+
call_tree = method.call_trees.callers[0]
|
1202
|
+
assert_equal('Allocator#run', call_tree.parent.target.full_name)
|
1203
|
+
assert_equal(400.0, call_tree.total_time)
|
1204
|
+
assert_equal(0.0, call_tree.wait_time)
|
1205
|
+
assert_equal(0.0, call_tree.self_time)
|
1206
|
+
assert_equal(400.0, call_tree.children_time)
|
1207
|
+
|
1208
|
+
assert_equal(1, method.call_trees.callees.length)
|
1209
|
+
call_tree = method.call_trees.callees[0]
|
1210
|
+
assert_equal('Integer#times', call_tree.target.full_name)
|
1211
|
+
assert_equal(400.0, call_tree.total_time)
|
1212
|
+
assert_equal(0.0, call_tree.wait_time)
|
1213
|
+
assert_equal(0.0, call_tree.self_time)
|
1214
|
+
assert_equal(400.0, call_tree.children_time)
|
1215
|
+
|
1216
|
+
# Method 6
|
1217
|
+
method = methods[6]
|
1218
|
+
assert_equal('Integer#times', method.full_name)
|
1219
|
+
assert_equal(400.0, method.total_time)
|
1220
|
+
assert_equal(0.0, method.wait_time)
|
1221
|
+
assert_equal(0.0, method.self_time)
|
1222
|
+
assert_equal(400.0, method.children_time)
|
1223
|
+
|
1224
|
+
assert_equal(1, method.call_trees.callers.length)
|
1225
|
+
call_tree = method.call_trees.callers[0]
|
1226
|
+
assert_equal('Allocator#make_arrays', call_tree.parent.target.full_name)
|
1227
|
+
assert_equal(400.0, call_tree.total_time)
|
1228
|
+
assert_equal(0.0, call_tree.wait_time)
|
1229
|
+
assert_equal(0.0, call_tree.self_time)
|
1230
|
+
assert_equal(400.0, call_tree.children_time)
|
1231
|
+
|
1232
|
+
assert_equal(4, method.call_trees.callees.length)
|
1233
|
+
|
1234
|
+
call_tree = method.call_trees.callees[0]
|
1235
|
+
assert_equal('Kernel#block_given?', call_tree.target.full_name)
|
1236
|
+
assert_equal(0, call_tree.total_time)
|
1237
|
+
assert_equal(0, call_tree.wait_time)
|
1238
|
+
assert_equal(0, call_tree.self_time)
|
1239
|
+
assert_equal(0, call_tree.children_time)
|
1240
|
+
|
1241
|
+
call_tree = method.call_trees.callees[1]
|
1242
|
+
assert_equal('Integer#<', call_tree.target.full_name)
|
1243
|
+
assert_equal(0, call_tree.total_time)
|
1244
|
+
assert_equal(0, call_tree.wait_time)
|
1245
|
+
assert_equal(0, call_tree.self_time)
|
1246
|
+
assert_equal(0, call_tree.children_time)
|
1247
|
+
|
1248
|
+
call_tree = method.call_trees.callees[2]
|
1249
|
+
assert_equal('<Class::Array>#new', call_tree.target.full_name)
|
1250
|
+
assert_equal(400, call_tree.total_time)
|
1251
|
+
assert_equal(0, call_tree.wait_time)
|
1252
|
+
assert_equal(400, call_tree.self_time)
|
1253
|
+
assert_equal(0, call_tree.children_time)
|
1254
|
+
|
1255
|
+
call_tree = method.call_trees.callees[3]
|
1256
|
+
assert_equal('Integer#succ', call_tree.target.full_name)
|
1257
|
+
assert_equal(0, call_tree.total_time)
|
1258
|
+
assert_equal(0, call_tree.wait_time)
|
1259
|
+
assert_equal(0, call_tree.self_time)
|
1260
|
+
assert_equal(0, call_tree.children_time)
|
1261
|
+
|
1262
|
+
# Method 7
|
1263
|
+
method = methods[7]
|
1264
|
+
assert_equal('<Class::Array>#new', method.full_name)
|
1265
|
+
assert_equal(400.0, method.total_time)
|
1266
|
+
assert_equal(0.0, method.wait_time)
|
1267
|
+
assert_equal(400.0, method.self_time)
|
1268
|
+
assert_equal(0.0, method.children_time)
|
1269
|
+
|
1270
|
+
assert_equal(1, method.call_trees.callers.length)
|
1271
|
+
call_tree = method.call_trees.callers[0]
|
1272
|
+
assert_equal('Integer#times', call_tree.parent.target.full_name)
|
1273
|
+
assert_equal(400.0, call_tree.total_time)
|
1274
|
+
assert_equal(0.0, call_tree.wait_time)
|
1275
|
+
assert_equal(400.0, call_tree.self_time)
|
1276
|
+
assert_equal(0.0, call_tree.children_time)
|
1277
|
+
|
1278
|
+
assert_equal(1, method.call_trees.callees.length)
|
1279
|
+
call_tree = method.call_trees.callees[0]
|
1280
|
+
assert_equal('Array#initialize', call_tree.target.full_name)
|
1281
|
+
assert_equal(0.0, call_tree.total_time)
|
1282
|
+
assert_equal(0.0, call_tree.wait_time)
|
1283
|
+
assert_equal(0.0, call_tree.self_time)
|
1284
|
+
assert_equal(0.0, call_tree.children_time)
|
1285
|
+
|
1286
|
+
# Method 8
|
1287
|
+
method = methods[8]
|
1288
|
+
assert_equal('<Class::String>#new', method.full_name)
|
1289
|
+
assert_equal(200, method.total_time)
|
1290
|
+
assert_equal(0, method.wait_time)
|
1291
|
+
assert_equal(40, method.self_time)
|
1292
|
+
assert_equal(160, method.children_time)
|
1293
|
+
|
1294
|
+
assert_equal(1, method.call_trees.callers.length)
|
1295
|
+
call_tree = method.call_trees.callers[0]
|
1296
|
+
assert_equal('Allocator#make_strings', call_tree.parent.target.full_name)
|
1297
|
+
assert_equal(200, call_tree.total_time)
|
1298
|
+
assert_equal(0, call_tree.wait_time)
|
1299
|
+
assert_equal(40, call_tree.self_time)
|
1300
|
+
assert_equal(160, call_tree.children_time)
|
1301
|
+
|
1302
|
+
assert_equal(1, method.call_trees.callees.length)
|
1303
|
+
|
1304
|
+
call_tree = method.call_trees.callees[0]
|
1305
|
+
assert_equal('String#initialize', call_tree.target.full_name)
|
1306
|
+
assert_equal(160, call_tree.total_time)
|
1307
|
+
assert_equal(0, call_tree.wait_time)
|
1308
|
+
assert_equal(160, call_tree.self_time)
|
1309
|
+
assert_equal(0, call_tree.children_time)
|
1310
|
+
|
1311
|
+
# Method 9
|
1312
|
+
method = methods[9]
|
1313
|
+
assert_equal('String#*', method.full_name)
|
1314
|
+
assert_equal(160, method.total_time)
|
1315
|
+
assert_equal(0, method.wait_time)
|
1316
|
+
assert_equal(160, method.self_time)
|
1317
|
+
assert_equal(0, method.children_time)
|
1318
|
+
|
1319
|
+
assert_equal(1, method.call_trees.callers.length)
|
1320
|
+
call_tree = method.call_trees.callers[0]
|
1321
|
+
assert_equal('Allocator#make_strings', call_tree.parent.target.full_name)
|
1322
|
+
assert_equal(160, call_tree.total_time)
|
1323
|
+
assert_equal(0, call_tree.wait_time)
|
1324
|
+
assert_equal(160, call_tree.self_time)
|
1325
|
+
assert_equal(0, call_tree.children_time)
|
1326
|
+
|
1327
|
+
assert_equal(0, method.call_trees.callees.length)
|
1328
|
+
|
1329
|
+
# Method 10
|
1330
|
+
method = methods[10]
|
1331
|
+
assert_equal('String#initialize', method.full_name)
|
1332
|
+
assert_equal(160, method.total_time)
|
1333
|
+
assert_equal(0, method.wait_time)
|
1334
|
+
assert_equal(160, method.self_time)
|
1335
|
+
assert_equal(0, method.children_time)
|
1336
|
+
|
1337
|
+
assert_equal(1, method.call_trees.callers.length)
|
1338
|
+
call_tree = method.call_trees.callers[0]
|
1339
|
+
assert_equal('<Class::String>#new', call_tree.parent.target.full_name)
|
1340
|
+
assert_equal(160, call_tree.total_time)
|
1341
|
+
assert_equal(0, call_tree.wait_time)
|
1342
|
+
assert_equal(160, call_tree.self_time)
|
1343
|
+
assert_equal(0, call_tree.children_time)
|
1344
|
+
|
1345
|
+
assert_equal(0, method.call_trees.callees.length)
|
1346
|
+
|
1347
|
+
# Method 11
|
1348
|
+
method = methods[11]
|
1349
|
+
assert_equal('BasicObject#initialize', method.full_name)
|
1350
|
+
assert_equal(0, method.total_time)
|
1351
|
+
assert_equal(0, method.wait_time)
|
1352
|
+
assert_equal(0, method.self_time)
|
1353
|
+
assert_equal(0, method.children_time)
|
1354
|
+
|
1355
|
+
assert_equal(1, method.call_trees.callers.length)
|
1356
|
+
call_tree = method.call_trees.callers[0]
|
1357
|
+
assert_equal('Class#new', call_tree.parent.target.full_name)
|
1358
|
+
assert_equal(0, call_tree.total_time)
|
1359
|
+
assert_equal(0, call_tree.wait_time)
|
1360
|
+
assert_equal(0, call_tree.self_time)
|
1361
|
+
assert_equal(0, call_tree.children_time)
|
1362
|
+
|
1363
|
+
assert_equal(0, method.call_trees.callees.length)
|
1364
|
+
|
1365
|
+
# Method 12
|
1366
|
+
method = methods[12]
|
1367
|
+
assert_equal('Kernel#block_given?', method.full_name)
|
1368
|
+
assert_equal(0, method.total_time)
|
1369
|
+
assert_equal(0, method.wait_time)
|
1370
|
+
assert_equal(0, method.self_time)
|
1371
|
+
assert_equal(0, method.children_time)
|
1372
|
+
|
1373
|
+
assert_equal(1, method.call_trees.callers.length)
|
1374
|
+
call_tree = method.call_trees.callers[0]
|
1375
|
+
assert_equal('Integer#times', call_tree.parent.target.full_name)
|
1376
|
+
assert_equal(0, call_tree.total_time)
|
1377
|
+
assert_equal(0, call_tree.wait_time)
|
1378
|
+
assert_equal(0, call_tree.self_time)
|
1379
|
+
assert_equal(0, call_tree.children_time)
|
1380
|
+
|
1381
|
+
assert_equal(0, method.call_trees.callees.length)
|
1382
|
+
|
1383
|
+
# Method 13
|
1384
|
+
method = methods[13]
|
1385
|
+
assert_equal('Integer#succ', method.full_name)
|
1386
|
+
assert_equal(0, method.total_time)
|
1387
|
+
assert_equal(0, method.wait_time)
|
1388
|
+
assert_equal(0, method.self_time)
|
1389
|
+
assert_equal(0, method.children_time)
|
1390
|
+
|
1391
|
+
assert_equal(1, method.call_trees.callers.length)
|
1392
|
+
call_tree = method.call_trees.callers[0]
|
1393
|
+
assert_equal('Integer#times', call_tree.parent.target.full_name)
|
1394
|
+
assert_equal(0, call_tree.total_time)
|
1395
|
+
assert_equal(0, call_tree.wait_time)
|
1396
|
+
assert_equal(0, call_tree.self_time)
|
1397
|
+
assert_equal(0, call_tree.children_time)
|
1398
|
+
|
1399
|
+
assert_equal(0, method.call_trees.callees.length)
|
1400
|
+
|
1401
|
+
# Method 14
|
1402
|
+
method = methods[14]
|
1403
|
+
assert_equal('Integer#<', method.full_name)
|
1404
|
+
assert_equal(0, method.total_time)
|
1405
|
+
assert_equal(0, method.wait_time)
|
1406
|
+
assert_equal(0, method.self_time)
|
1407
|
+
assert_equal(0, method.children_time)
|
1408
|
+
|
1409
|
+
assert_equal(1, method.call_trees.callers.length)
|
1410
|
+
call_tree = method.call_trees.callers[0]
|
1411
|
+
assert_equal('Integer#times', call_tree.parent.target.full_name)
|
1412
|
+
assert_equal(0, call_tree.total_time)
|
1413
|
+
assert_equal(0, call_tree.wait_time)
|
1414
|
+
assert_equal(0, call_tree.self_time)
|
1415
|
+
assert_equal(0, call_tree.children_time)
|
1416
|
+
|
1417
|
+
assert_equal(0, method.call_trees.callees.length)
|
1418
|
+
|
1419
|
+
# Method 15
|
1420
|
+
method = methods[15]
|
1421
|
+
assert_equal('Hash#initialize', method.full_name)
|
1422
|
+
assert_equal(0.0, method.total_time)
|
1423
|
+
assert_equal(0.0, method.wait_time)
|
1424
|
+
assert_equal(0.0, method.self_time)
|
1425
|
+
assert_equal(0.0, method.children_time)
|
1426
|
+
|
1427
|
+
assert_equal(1, method.call_trees.callers.length)
|
1428
|
+
call_tree = method.call_trees.callers[0]
|
1429
|
+
assert_equal('Class#new', call_tree.parent.target.full_name)
|
1430
|
+
assert_equal(0.0, call_tree.total_time)
|
1431
|
+
assert_equal(0.0, call_tree.wait_time)
|
1432
|
+
assert_equal(0.0, call_tree.self_time)
|
1433
|
+
assert_equal(0.0, call_tree.children_time)
|
1434
|
+
|
1435
|
+
assert_equal(0, method.call_trees.callees.length)
|
1436
|
+
|
1437
|
+
# Method 16
|
1438
|
+
method = methods[16]
|
1439
|
+
assert_equal('Array#initialize', method.full_name)
|
1440
|
+
assert_equal(0.0, method.total_time)
|
1441
|
+
assert_equal(0.0, method.wait_time)
|
1442
|
+
assert_equal(0.0, method.self_time)
|
1443
|
+
assert_equal(0.0, method.children_time)
|
1444
|
+
|
1445
|
+
assert_equal(1, method.call_trees.callers.length)
|
1446
|
+
call_tree = method.call_trees.callers[0]
|
1447
|
+
assert_equal('<Class::Array>#new', call_tree.parent.target.full_name)
|
1448
|
+
assert_equal(0.0, call_tree.total_time)
|
1449
|
+
assert_equal(0.0, call_tree.wait_time)
|
1450
|
+
assert_equal(0.0, call_tree.self_time)
|
1451
|
+
assert_equal(0.0, call_tree.children_time)
|
1452
|
+
|
1021
1453
|
assert_equal(0.0, method.call_trees.callees.length)
|
1022
1454
|
end
|
1023
1455
|
end
|