Skip to content

profiling.sampling (Tachyon) gecko output: Only source file basename is shown #160976

Description

@laundmo

Bug report

When using the --gecko exporter for profiling.sampling, only the basename for source files is shown.

This means that to distinguish, for example, samples from __init__.py, the function name and surrounding context has to be read, which is rather unfortunate.

Related source lines:

filename_idx = self._intern_string(os.path.basename(filename))

resource_name = (
os.path.basename(filename) if "/" in filename else filename
)

Tested on 3.15, but gecko exporter source code matches.

CPython versions tested on:

3.15

Operating systems tested on:

Linux

Linked PRs

Activity

  1. added
    type-bug
    on Oct 30, 2026
  2. makwana-akshat commented on Oct 30, 2026

    @makwana-akshat
    Contributor

    i would like to solve this issue. assign/

  3. added
    stdlib
    on Oct 30, 2026
  4. added 4 commits that reference this issue on Oct 30, 2026
  5. added a commit that references this issue on Nov 24, 2026
  6. added a commit that references this issue on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibtopic-profilingtype-bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions