add concept of execution time to diff#1
Open
sdmcclain wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR does two things:
In https://github.com/mcclaized/edav_final_project/blob/master/bin/run_pyflame, I run the code twice, first to grab the execution time of the program with no profilers adding overhead, the second using pyflame to generate the profile.
I am passing this forward, because it will be used in sdmcclain/node-stack-convert#1 to determine the number of seconds that each function call contributes to the overall runtime.
-uoption) that compares only the differences of two profiles. https://github.com/corpaul/flamegraphdiff deserves a major shout out for the inspiration of this work, but my implementation is somewhat different.Without
-u, each line represents a call stack, and is followed by 2 numbers, representing the number of times the two inputs files were sampled at this call stack:difffolded.pl profile1.folded profile2.foldedgivesmy_file.py:38 4 2where 4 is the number of times the program was sampled at line 38 of
my_file.pyin profile1 and 2 times in profile 2.In the
-umode, the output is different. We first discard any case where the number of calls is the same, then we take the diffabs(profile2_calls - profile1_calls)and store it as the first number, with the sign as the second number. So, in the above example, the output would be:my_file.py:38 2 -1Because 2 is the difference in number of calls, and the -1 signifies that the second file has fewer calls than the first.
See sdmcclain/node-stack-convert#1 for details on how this will be used