Skip to content

Commit

Permalink
Add better documentation for the call tree strategies
Browse files Browse the repository at this point in the history
  • Loading branch information
gregtatum committed Jul 17, 2019
1 parent df6f593 commit 134eaac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/actions/profile-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -940,6 +940,11 @@ export function changeImplementationFilter(
};
}

/**
* This action changes the strategy used to build and display the call tree. This could
* use sample data, or build a new call tree based off of allocation information stored
* in markers.
*/
export function changeCallTreeSummaryStrategy(
strategy: CallTreeSummaryStrategy
): Action {
Expand Down
5 changes: 4 additions & 1 deletion src/profile-logic/profile-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -697,8 +697,11 @@ export function toValidCallTreeSummaryStrategy(
case 'native-allocations':
return strategy;
default:
// Default to timing if the strategy is not recognized. This value can come
// Default to "timing" if the strategy is not recognized. This value can come
// from a user-generated URL.
// e.g. `profiler.firefox.com/public/hash/ctSummary=tiiming` (note the typo.)
// This default branch will ensure we don't send values we don't understand to
// the store.
return 'timing';
}
}
Expand Down

0 comments on commit 134eaac

Please sign in to comment.