Summary:
For complexity issues from O(m) to O(n), we only include the trace of the current complexity O(n). However, this makes it difficult to understand what the original complexity O(m) was. Especially in fixed issues where n=1, we only get a constant cost with no trace attached, so it is difficult to see how the symbol m disappeared.
This diff includes the traces for the previous cost in the cost issues.
Reviewed By: skcho
Differential Revision: D23680360
fbshipit-source-id: 3f2b21b20
master
Ezgi Çiçek5 years agocommitted byFacebook GitHub Bot
EXECUTION_TIME_COMPLEXITY_INCREASE, no_bucket, src/DiffExample.java, DiffExample.f6(java.util.ArrayList):void, 0, [Updated Cost of f6 is 5 + list.length × log(list.length) (degree is 1 + 1⋅log),{list.length},Call to void DiffExample.f5(ArrayList),Modeled call to Collections.sort,{list.length},Call to void DiffExample.f5(ArrayList),Modeled call to Collections.sort]
EXECUTION_TIME_COMPLEXITY_INCREASE_UI_THREAD, no_bucket, src/DiffExampleUIThread.java, DiffExampleUIThread.f1(int):void, 0, [Updated Cost of f1 is 3 (degree is 0)]
EXECUTION_TIME_COMPLEXITY_INCREASE, no_bucket, src/DiffExample.java, DiffExample.f6(java.util.ArrayList):void, 0, [Previous Cost of f6 is 7 + 13 ⋅ n + 5 ⋅ n × n (degree is 2),{n},Call to void DiffExample.f2(int),Call to int DiffExample.f1(int),Loop,{n},Call to void DiffExample.f2(int),Loop,Updated Cost of f6 is 5 + list.length × log(list.length) (degree is 1 + 1⋅log),{list.length},Call to void DiffExample.f5(ArrayList),Modeled call to Collections.sort,{list.length},Call to void DiffExample.f5(ArrayList),Modeled call to Collections.sort]
EXECUTION_TIME_COMPLEXITY_INCREASE_UI_THREAD, no_bucket, src/DiffExampleUIThread.java, DiffExampleUIThread.f1(int):void, 0, [Previous Cost of f1 is 5 + 5 ⋅ x (degree is 1),{x},Loop,Updated Cost of f1 is 3 (degree is 0)]
EXECUTION_TIME_COMPLEXITY_INCREASE, no_bucket, src/DiffExample.java, DiffExample.f4(int):int, 0, [Updated Cost of f4 is 6 + 5 ⋅ k (degree is 1),{k},Loop]
EXECUTION_TIME_COMPLEXITY_INCREASE, no_bucket, src/DiffExample.java, DiffExample.f5(java.util.ArrayList):void, 0, [Updated Cost of f5 is 2 + list.length × log(list.length) (degree is 1 + 1⋅log),{list.length},Modeled call to Collections.sort,{list.length},Modeled call to Collections.sort]
EXECUTION_TIME_COMPLEXITY_INCREASE_UI_THREAD, no_bucket, src/DiffExampleUIThread.java, DiffExampleUIThread.f2(int):void, 0, [Updated Cost of f2 is 5 + 5 ⋅ x (degree is 1),{x},Loop]
EXECUTION_TIME_COMPLEXITY_INCREASE, no_bucket, src/DiffExample.java, DiffExample.f4(int):int, 0, [Previous Cost of f4 is 5 (degree is 0),Updated Cost of f4 is 6 + 5 ⋅ k (degree is 1),{k},Loop]
EXECUTION_TIME_COMPLEXITY_INCREASE, no_bucket, src/DiffExample.java, DiffExample.f5(java.util.ArrayList):void, 0, [Previous Cost of f5 is 9 + 5 ⋅ n (degree is 1),{n},Call to int DiffExample.f1(int),Loop,Updated Cost of f5 is 2 + list.length × log(list.length) (degree is 1 + 1⋅log),{list.length},Modeled call to Collections.sort,{list.length},Modeled call to Collections.sort]
EXECUTION_TIME_COMPLEXITY_INCREASE_UI_THREAD, no_bucket, src/DiffExampleUIThread.java, DiffExampleUIThread.f2(int):void, 0, [Previous Cost of f2 is 3 (degree is 0),Updated Cost of f2 is 5 + 5 ⋅ x (degree is 1),{x},Loop]