i wrote an extension for Mercurial e.g. hg dosomthing --rev 5
and I was wondering what is the right approach to writing performance test cases to monitor the performance of the extension from when its executed till its end!
Ta:)
i wrote an extension for Mercurial e.g. hg dosomthing --rev 5
and I was wondering what is the right approach to writing performance test cases to monitor the performance of the extension from when its executed till its end!
Ta:)
Mercurial has support for running itself under a Python profiler. Just execute
$ hg --profile dosomething --rev 5
and you'll see the profile output afterwards. See the hgrc man page for a few options you have. If you just want timing data, then use
$ hg --time dosomething --rev 5
instead.
You should also have a look at the perf extension. It runs a command many times (like the timeit module) and reports the best running time. You'll have to extend the extension to run your new command, but it should be simple since all the performance tests follow the same pattern.
© 2022 - 2024 — McMap. All rights reserved.