* Add support for tag units
Updated tests for adding tag units
* updated proto docs to describe tag units
* fixed formatting
* added additional test
* require specific units for graph tag to be recognixed
* updated tests and formatting
* Fixed formatting
* Fixed style error
* modify proto_test to be sure tag units not overwritten
* Clarified label docs
* call legacy profile memory allocations size, not byte
* updated tests to call bytes tags in legacy profile size
* Revert "updated tests to call bytes tags in legacy profile size"
This reverts commit 9289378af2.
* Revert "call legacy profile memory allocations size, not byte"
This reverts commit 6b18973562.
* Updated so units not modified when profile written out
* Fixed formatting errors
* Removed field for inferred numeric label units from profile
* Modified profile String() output
* fixed formatting error
* changed name of function used to identify units for numeric labels
* Refactor String() for profile
* Modified for clarity and address comments
* renamed function for clarity
* Made numeric label units field seperate in profile
* Modified test
* Refactored identifyNumLabelUnits()
* Updated comments
* Fixed formatting error
* Addressed comments
* Fixed style error
* clarify comment
* Refactored to address comments
* addressed comments
* addressed comments
* addressed comments
Make TestHttpsInsecure test reliably passing on Darwin. (#171)
* Make TestHttpsInsecure test reliably passing on Darwin.
TestHttpsInsecure test runs a profiling session and checks that the
results contain expected function name. On OSX prior to 10.11 El Capitan
the SIGPROF signal is delivered to the process rather than to the thread
which skews the results enough for the test to fail.
Relax the check when running on OSX and other operating systems known to
have issues with the profiling signal (the list is taken from
src/runtime/pprof/pprof_test.go in Go source).
Also add the multiple variants of OSX to the continuous testing.
Fixes #146 and #156.
* Document the motivation for the empty loop.
Create a fake mapping for profile.proto profiles (#135)
* Create a fake mapping for profile.proto profiles
If a profile has mappings but no profiles, pprof may be unable to
symbolize it offline, as it uses the mappings to keep track of which
locations need symbolization.
This fixes #120.
Added the test, verified it fails on Mac with Go 1.7 before the fix, and
passes with the fix. The test is done by augmenting the existing test
for handling https+insecure:// schema in URLs. This is a bit vague but I
figured that this test needed an updated anyway since as we moved it
recently we stopped exercising the symbolization as part of the test
which was its original intention in fixing #94. Can split the tests if
things do look too ugly.
* Fix the test to include the failed regex matching error in the message.
Use a more regular mechanism to name sources during driver tests and
recognize the naming during fetching to avoid saving the test profiles
into $HOME/pprof.
Also move the https+insecure testing into fetch_test, to focus it on
fetching the profile.
This fixes #107
In changeset f90721db3d, fetch.go was changed to handle
the correct home directory environment variable on Plan 9
and Windows, but the tests were still using the $HOME
environment variable.
We change the tests to use the homeEnv function instead
of the $HOME environment variable.
Fixes #100.
Allow binary override for profiles with no mappings (#89)
The go runtime generates profiles in profile.proto format
without symbols or mappings. The expectation is that these
can be symbolized by passing the binary name to pprof.
The mechanism pprof uses relies to override the binary relies
on there being a mapping, and previously we moved the creation
of fake mappings to the legacy profile handlers, so profiles
parsed from profile.proto with no mappings can no longer be
symbolized.
Special case this situation to create a fake mapping and associate
all locations to it if there is a command line override but no
mappings.
Reset mapping file to empty string if it was patched to be the source URL.
When the source is remote and a mapping doesn't have either build ID or
file field set, the file field is set to the source URL so that the
proper source from the source mapping is used during symbolz processing.
Before this change, the file field would continue to point to the URL
producing the URL in pprof output which confuses users.
With the change it resets the file field back to the empty string. It
also now skips the URL-like paths during local symbolization as
reading at that path is not going to succeed.
We discussed switching to generating more unique IDs. On the second
thought, I propose leaving these to be URLs as that seems unique enough
and in case this field leaks into the tool or log output seeing the URL
seems still friendlier than some arbitrarily prefixed string.