[cost][differential] Add FP test for blocks

Summary: We shouldn't report a complexity increase here because `existing_block_here` is a removed function (that doesn't exist in current version)!

Reviewed By: skcho

Differential Revision: D26947439

fbshipit-source-id: 6620804be
master
Ezgi Çiçek 4 years ago committed by Facebook GitHub Bot
parent 7110c1ca3f
commit 55e4108a35

@ -1 +1 @@
{"top":{"current":0,"previous":0},"unreachable":{"current":0,"previous":0},"zero":{"current":0,"previous":0},"degrees":[{"degree":0,"current":20,"previous":15},{"degree":100,"current":5,"previous":1},{"degree":200,"current":1,"previous":0}]}
{"top":{"current":0,"previous":0},"unreachable":{"current":0,"previous":0},"zero":{"current":0,"previous":0},"degrees":[{"degree":0,"current":20,"previous":23},{"degree":100,"current":5,"previous":1},{"degree":200,"current":1,"previous":0}]}

@ -1,2 +1,3 @@
EXECUTION_TIME_COMPLEXITY_INCREASE, no_bucket, src/DiffBlock.m, CallBlocks.take_two_blocks:block1:block2:[objc_blockHandler.create_block_here:array:call:_2^objc_blockHandler.create_block_here:array:call:_3], 0, [Previous Cost of take_two_blocks:block1:block2: is 6 (degree is 0),Updated Cost of take_two_blocks:block1:block2: is 22 + 9 ⋅ (array[create_block_here:array:call:]->elements.length + 1) (degree is 1),{array[create_block_here:array:call:]->elements.length + 1},Call to objc_blockHandler.create_block_here:array:call:_2,Loop]
EXECUTION_TIME_COMPLEXITY_INCREASE, no_bucket, src/DiffBlock.m, Handler.func_linear:, 0, [Previous Cost of func_linear: is 4 + 5 ⋅ (array->elements.length + 1) (degree is 1),{array->elements.length + 1},Loop,Updated Cost of func_linear: is 4 + 3 ⋅ array->elements.length × (array->elements.length + 1) + 8 ⋅ (array->elements.length + 1) + 3 ⋅ (array->elements.length + 1) × (array->elements.length + 1) (degree is 2),{array->elements.length + 1},Loop,{array->elements.length},Call to Handler.loop_linear:,Loop]
EXECUTION_TIME_COMPLEXITY_INCREASE, no_bucket, src/DiffBlock.m, objc_blockHandler.func_linear_1, 0, [Previous Cost of objc_blockHandler.func_linear_1 is 21 (degree is 0),Updated Cost of objc_blockHandler.func_linear_1 is 23 + 3 ⋅ str.length + 3 ⋅ (str.length + 1) (degree is 1),{str.length},Loop]

@ -46,6 +46,15 @@
}
}
- (void)existing_block_here:(NSInteger*)n
array:(NSArray*)array
call:(CallBlocks*)call {
[call take_two_blocks:n
block1:^(NSInteger* n) {
}
block2:^(NSInteger* n){
}];
}
@end
int main() { return 0; }

Loading…
Cancel
Save