Skip to content

Remove path prefix from filename in profile #4716

@mrocklin

Description

@mrocklin

Currently in profiles we include the full filename in the profile information. These filenames look like this:

/srv/conda/evs/notebook/libs/python3.8/site-packages/fsspec/asyn.py

We might consider chopping off everything before site-packages so that we have the following:

fsspec/asyn.py

The path prefix is useful in that it helps us to immediately identify a file if we're on the same machine, but it also leaks slightly personal information, and is generally not helpful especially if we're looking at these results on a different system. Aesthetically this is also often the longest part of the printed result, and results in wonky display issues.

I propose that we strip out everything up-to-and-including "site-packages"

(example performance report for reference)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions