# HG changeset patch # User Raphaël Gomès <rgomes@octobus.net> # Date 1736953906 -3600 # Wed Jan 15 16:11:46 2025 +0100 # Node ID d8a701edf022c09a3a7cf8a0de5c583b44a37d22 # Parent 5afc8620e1cd3ec61e378a09f0c150a939aac8ff hg-benchmarks: add an annotate benchmark diff --git a/suites/hg/benchmarks/annotate.pbd b/suites/hg/benchmarks/annotate.pbd new file mode 100644 --- /dev/null +++ b/suites/hg/benchmarks/annotate.pbd @@ -0,0 +1,47 @@ +[meta] +format = "0" +name = "hg.command.annotate" +method = "simple-command" + +[run] +copy-data-env = false + +[simple-command] +command = "hg annotate $FILES > /dev/null" +cwd = "DATA-VARS:mercurial.main-repo-path" + +[simple-command.variants.dimensions.files."file-with-long-history.a"] +default = true + +[simple-command.variants.dimensions.files."file-with-long-history.a".environment] +FILES = "DATA-VARS:mercurial.file-with-long-history.a" + +[simple-command.variants.dimensions.files."file-with-long-history.b".environment] +FILES = "DATA-VARS:mercurial.file-with-long-history.b" + +[simple-command.variants.dimensions.files."file-with-long-history.c".environment] +FILES = "DATA-VARS:mercurial.file-with-long-history.c" + +[simple-command.variants.dimensions.files."file-with-long-history.d".environment] +FILES = "DATA-VARS:mercurial.file-with-long-history.d" + +[simple-command.variants.dimensions.files."file-with-long-history.e".environment] +FILES = "DATA-VARS:mercurial.file-with-long-history.e" + +[simple-command.variants.dimensions.follow-copies.yes] +default = true + +[simple-command.variants.dimensions.follow-copies.no] +extend-command = " --no-follow" + +[simple-command.variants.dimensions.files-as-text.yes] +extend-command = " --text" + +[simple-command.variants.dimensions.files-as-text.no] +default = true + +[simple-command.variants.dimensions.listed.default] +default = true + +[simple-command.variants.dimensions.listed.all] +extend-command = " --user --file --date --changeset --line-number" diff --git a/suites/hg/benchmarks/annotate.pkl b/suites/hg/benchmarks/annotate.pkl new file mode 100644 --- /dev/null +++ b/suites/hg/benchmarks/annotate.pkl @@ -0,0 +1,36 @@ +amends "lib/simple-command.pkl" +import "lib/variants.pkl" as v + +name = "hg.command.annotate" +copy_data_env = false + +command = "hg annotate $FILES > /dev/null" +cwd = "DATA-VARS:mercurial.main-repo-path" + +variants { + ["files"] = (v.simple_command["file-reading-revs"]) { + default_key = "file-with-long-history.a" + } + ["follow-copies"] { + default_key = "yes" + cases { + ["yes"]{} + ["no"]{extend_command = " --no-follow"} + } + } + ["files-as-text"] { + default_key = "no" + cases { + ["yes"]{extend_command = " --text"} + ["no"]{} + } + } + ["listed"] { + default_key = "default" + cases { + ["default"] {} + ["all"] {extend_command = " --user --file --date --changeset --line-number"} + + } + } +} diff --git a/tests/test-setup-poulpe-den.t b/tests/test-setup-poulpe-den.t --- a/tests/test-setup-poulpe-den.t +++ b/tests/test-setup-poulpe-den.t @@ -120,7 +120,7 @@ data environments: [OKAY] available: 0 benchmarks: [OKAY] - available: 28 + available: 29 results: [OKAY] poulpe suites: [OKAY] available bin setup: 2 @@ -137,7 +137,7 @@ data environments: [OKAY] available: 0 benchmarks: [OKAY] - available: 28 + available: 29 results: [OKAY] poulpe suites: [OKAY] available bin setup: 2