

There is a full-fat statistics/1 from library(statistics)
(file swipl/lib/swipl/library/statistics.pl
) which doesn't show up in the manual here but which DOES show up in the manual page for library(statistics)
:
%! statistics(-Stats:dict) is det. % % Stats is a dict representing the same information as % statistics/0. This convience function is primarily intended to % pass statistical information to e.g., a web client. Time % critical code that wishes to collect statistics typically only % need a small subset and should use statistics/2 to obtain % exactly the data they need.
For example:
?- statistics(X). X = statistics{agc:gc{count:5, gained:916, time:0.002623126999999989, type:atom, unit:atom}, cgc:gc{count:6, gained:137, time:7.701300000000636e-5, type:clause, unit:clause}, data:counts{atoms:6844, functors:4724, modules:46, predicates:3500, vm_codes:130740}, gc:gc{count:2, gained:268592, time:0.0005181080000000171, type:stack, unit:byte}, shift:shift{global:4, local:2, time:0.00043647099999999384, trail:2}, stacks:stacks{global:stack{allocated:65504, name:global, usage:24224}, local:stack{allocated:20344, name:local, usage:2256}, total:stack{allocated:120640, limit:1073741824, name:stacks, usage:27616}, trail:stack{allocated:34792, name:trail, usage:1136}}, thread:thread{count:2, finished:0, time:0.0}, time:time{cpu:0.202152664, epoch:1598951892.5977635, inferences:517088}}.