<?php

/**
 * JCOGS Image Pro - Benchmark Data Route
 * ======================================
 * CP-scoped JSON endpoint for cache benchmark data.
 */

namespace JCOGSDesign\JCOGSImagePro\ControlPanel\Routes\Caching;

use JCOGSDesign\JCOGSImagePro\Actions\CacheAjaxEndpoints;
use JCOGSDesign\JCOGSImagePro\ControlPanel\Routes\ImageAbstractRoute;

class BenchmarkData extends ImageAbstractRoute
{
    /**
     * @var string
     */
    protected $route_path = 'caching/benchmark_data';

    /**
     * Delegate to shared cache benchmark action logic.
     *
     * @param mixed $id
     * @return $this
     */
    public function process($id = false)
    {
        $action = new CacheAjaxEndpoints();
        $action->benchmark_threshold();

        return $this;
    }
}
