<commit_before><?php

namespace Itkg\Bundle\PhpRedmonBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Itkg\Bundle\PhpRedmonBundle\Monitoring\RedisMonitoring;
use Itkg\Bundle\PhpRedmonBundle\Redis\Predis\Client;
use Itkg\Bundle\PhpRedmonBundle\Config\PhpRedmonConfig;

class PhpRedmonController extends Controller
{
    /**
     * @Route("/phpredmon",name="dashboard")
     * @Template()
     */
    public function indexAction()
    {
        
        $redis = new \Itkg\Bundle\PhpRedmonBundle\Redis\Predis\Client('tcp://192.168.50.4:6379');        
        //$redis = new \Itkg\Bundle\PhpRedmonBundle\Redis\Predis\Client('tcp://10.255.252.219:6379');        
        $monitoring =  new \Itkg\Bundle\PhpRedmonBundle\Monitoring\RedisMonitoring($redis);
        $infos = $monitoring->GetStat();
        
        
        $SlowLog = $monitoring->GetSlowLog();
        
  
        $keySpace = $monitoring->Getkeyspace();
   
        
     
        return array('Server'=>$infos['Server'],'Clients'=>$infos['Clients'],'Memory'=>$infos['Memory'],
             'Persistence' => $infos['Persistence'],'Stats'=>$infos['Stats'],'Replication'=>$infos['Replication'],
            'CPU'=>$infos['CPU'],'keyspace'=>$keySpace,'slowLog'=>$SlowLog);
    }
    /**
     * @Route("/phpredmon/client",name="client")
     * @Template()
     */
    public function clientAction()
    {
         $redis = new \Itkg\Bundle\PhpRedmonBundle\Redis\Predis\Client('tcp://192.168.50.4:6379');        
         $monitoring =  new \Itkg\Bundle\PhpRedmonBundle\Monitoring\RedisMonitoring($redis);
         $clientList =  $monitoring->GetClientList();
         return array('client_list'=>$clientList);
         
    }
    
    
    /**
     * @Route("/phpredmon/config",name="configuration")
     * @Template()
     */
    public function configAction()
    {
         $redis = new \Itkg\Bundle\PhpRedmonBundle\Redis\Predis\Client('tcp://192.168.50.4:6379');        
         $monitoring =  new \Itkg\Bundle\PhpRedmonBundle\Monitoring\RedisMonitoring($redis);
         $configlist =  $monitoring->GetConfig();
         return array('configlist'=>$configlist);
         <commit_msg>maj controler<commit_after><?php

namespace Itkg\Bundle\PhpRedmonBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Itkg\Bundle\PhpRedmonBundle\Monitoring\RedisMonitoring;
use Itkg\Bundle\PhpRedmonBundle\Redis\Predis\Client;
use Itkg\Bundle\PhpRedmonBundle\Config\PhpRedmonConfig;

class PhpRedmonController extends Controller
{
    /**
     * @Route("/phpredmon",name="dashboard")
     * @Template()
     */
    public function indexAction()
    {
        
        //$redis = new \Itkg\Bundle\PhpRedmonBundle\Redis\Predis\Client('tcp://192.168.50.4:6379');        
        $redis = new \Itkg\Bundle\PhpRedmonBundle\Redis\Predis\Client('tcp://10.255.252.219:6379');        
        $monitoring =  new \Itkg\Bundle\PhpRedmonBundle\Monitoring\RedisMonitoring($redis);
        $infos = $monitoring->GetStat();
        
        
        $SlowLog = $monitoring->GetSlowLog();
        
  
        $keySpace = $monitoring->Getkeyspace();
   
        
     
        return array('Server'=>$infos['Server'],'Clients'=>$infos['Clients'],'Memory'=>$infos['Memory'],
             'Persistence' => $infos['Persistence'],'Stats'=>$infos['Stats'],'Replication'=>$infos['Replication'],
            'CPU'=>$infos['CPU'],'keyspace'=>$keySpace,'slowLog'=>$SlowLog);
    }
    /**
     * @Route("/phpredmon/client",name="client")
     * @Template()
     */
    public function clientAction()
    {
         //$redis = new \Itkg\Bundle\PhpRedmonBundle\Redis\Predis\Client('tcp://192.168.50.4:6379');        
        $redis = new \Itkg\Bundle\PhpRedmonBundle\Redis\Predis\Client('tcp://10.255.252.219:6379');        
         $monitoring =  new \Itkg\Bundle\PhpRedmonBundle\Monitoring\RedisMonitoring($redis);
         $clientList =  $monitoring->GetClientList();
         return array('client_list'=>$clientList);
         
    }
    
    
    /**
     * @Route("/phpredmon/config",name="configuration")
     * @Template()
     */
    public function configAction()
    {
         //$redis = new \Itkg\Bundle\PhpRedmonBundle\Redis\Predis\Client('tcp://192.168.50.4:6379'); 
         $redis = new \Itkg\Bundle\PhpRedmonBundle\Redis\Predis\Client('tcp://10.255.252.219:6379');        
         $monitoring =  new \Itkg\Bundle\PhpRedmonBundle\Monitoring\RedisMonitoring($redis);
         $configlist =  $monitoring->GetConfig();
         return array('configlist'=>$configlist);
         
{'fraction_non_alphanumeric': 0.16217337204479468, 'fraction_numerical': 0.02861883036084612, 'mean_word_length': 2.9532786885245903, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 10, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '678773', 'n_tokens_mistral': 1644, 'n_tokens_neox': 1560, 'n_words': 155}