Enable statisticsBy default, statistics generation is disabled in PlantUML. If you want to enable statistic generation, you can either:
-enablestatsflag in the command line
enablestats="true"setting with the ANT task
- Globally set the environment variable
OptionFlags.getInstance().setEnableStats(true)from your Java code
Statistics ReportYou can generate statistics about your PlantUML usage either at XML or HTML format.
To do so, you can add
-htmlstats flag in the command line. A file plantuml-stats.xml or plantuml-stats.html will be written at the end of the process:
If you want to generate statistics on the fly (rather than at the end of the process), you can use the flag
There is also a
-loopstats flag in the command line that continuously prints to the console statistics about diagram generations. This could be useful if you have some background daemon running PlantUML.
Some of those options are also available with the ANT task.
Java Integration APIIf you use PlantUML as a library, you can use the
StatsUtils.getStats()methods that return a
Statsobject with all datas.
You can retrieve it to use it as you wish.
Here is a short class diagram about this API:
Implementation note: The storage of historical data are provided through the Preference API.
You can contribute on this page by clicking here