Skip to content

[feature request] werkzeug.contrib.profiler.ProfilerMiddleware custom file name formatting #1283

@ChrisCarini

Description

@ChrisCarini

It would be nice to allow users to customize the output file name format when using the ProfilerMiddleware.

Currently, the file name format is '%(method)s.%(path)s.%(elapsed)06dms.%(time)d', which when multiple invocations have occurred leads to the profile files being ordered by their respective elapsed times. Having the ability to customize this format allows profiling users to make use of the resultant profile files in additional ways.

I propose the profiler.ProfilerMiddleware is changed to allow users to customize the format of the profile filenames for their specific needs.

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