Skip to content

Latest commit

 

History

History
32 lines (21 loc) · 2.42 KB

File metadata and controls

32 lines (21 loc) · 2.42 KB

Benchmarks

Documentation about how to run various performance benchmark for djangofmt versus similar tools:

  • djlint: Same scope as djangofmt - fully featured template formatter
  • djhtml: Only an indenter, it will never add/remove newlines
  • djade: Only format django template syntax - HTML is not formatted
  • prettier: Does not support Django and only format HTML

Running Benchmarks

Simply run this command, providing a directory containing django templates. You can change the print width with the LINE_LENGTH env variable (default: 120)

just bench-py ~/templates

A setup step will discover every html files inside and then run the various tools on it.

Important

This will cause destructive operations, be sure to target a safe directory (tracked with git or temporary)

Color Palette for charts

Built using vega playground.

Color palette:

  • bars -> #187f58
  • labels (light mode) -> #333333
  • labels (dark mode) -> #c9d1d9