private function registerFormatter(Container $container)
{
$container->register('phpbench.formatter.registry', function (Container $container) {
$registry = new FormatRegistry();
$registry->register('printf', new PrintfFormat());
$registry->register('balance', new BalanceFormat());
$registry->register('number', new NumberFormat());
$registry->register('truncate', new TruncateFormat());
$registry->register('time', new TimeUnitFormat($container->get('benchmark.time_unit')));
return $registry;
});
$container->register('phpbench.formatter', function (Container $container) {
$formatter = new Formatter($container->get('phpbench.formatter.registry'));
$formatter->classesFromFile(__DIR__ . '/config/class/main.json');
return $formatter;
});
}