SHARE
TWEET

Untitled

a guest Oct 14th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public function getDetailVas()
  2.     {
  3.         //succes rate
  4.         $succes = $this->db->query('SELECT FROM_UNIXTIME( ( UNIX_TIMESTAMP(time) DIV (15* 60) ) * (15*60) ) time , counter , SUM(count) count FROM umb.ussdnode72 WHERE counter ="SUCCESS" GROUP BY UNIX_TIMESTAMP(time) DIV (15* 60) desc')->row();
  5.         $FAILED_DIALOG_TIMEOUT = $this->db->query('SELECT FROM_UNIXTIME( ( UNIX_TIMESTAMP(time) DIV (15* 60) ) * (15*60) ) time , counter , SUM(count) count FROM umb.ussdnode72 WHERE counter ="FAILED_DIALOG_TIMEOUT" GROUP BY UNIX_TIMESTAMP(time) DIV (15* 60) desc')->row();
  6.         $FAILED_PROVIDER_ABORT = $this->db->query('SELECT FROM_UNIXTIME( ( UNIX_TIMESTAMP(time) DIV (15* 60) ) * (15*60) ) time , counter , SUM(count) count FROM umb.ussdnode72 WHERE counter ="FAILED_PROVIDER_ABORT" GROUP BY UNIX_TIMESTAMP(time) DIV (15* 60) desc')->row();  
  7.         $FAILED_DIALOG_USER_ABORT = $this->db->query('SELECT FROM_UNIXTIME( ( UNIX_TIMESTAMP(time) DIV (15* 60) ) * (15*60) ) time , counter , SUM(count) count FROM umb.ussdnode72 WHERE counter ="FAILED_DIALOG_USER_ABORT" GROUP BY UNIX_TIMESTAMP(time) DIV (15* 60) desc')->row();  
  8.         $FAILED_DIALOG_REJECTED = $this->db->query('SELECT FROM_UNIXTIME( ( UNIX_TIMESTAMP(time) DIV (15* 60) ) * (15*60) ) time , counter , SUM(count) count FROM umb.ussdnode72 WHERE counter ="FAILED_DIALOG_REJECTED" GROUP BY UNIX_TIMESTAMP(time) DIV (15* 60) desc')->row();  
  9.        
  10.        
  11.                  
  12.  
  13.         //error
  14.         $FAILED_SYSTEM_FAILURE = $this->db->query('SELECT FROM_UNIXTIME( ( UNIX_TIMESTAMP(time) DIV (15* 60) ) * (15*60) ) time , counter , SUM(count) count FROM umb.ussdnode72 WHERE counter ="FAILED_SYSTEM_FAILURE" GROUP BY UNIX_TIMESTAMP(time) DIV (15* 60) desc')->row();  
  15.         $FAILED_MAP_ERROR_COMPONENT = $this->db->query('SELECT FROM_UNIXTIME( ( UNIX_TIMESTAMP(time) DIV (15* 60) ) * (15*60) ) time , counter , SUM(count) count FROM umb.ussdnode72 WHERE counter ="FAILED_MAP_ERROR_COMPONENT" GROUP BY UNIX_TIMESTAMP(time) DIV (15* 60) desc')->row();  
  16.         $FAILED_MAP_REJECT_COMPONENT = $this->db->query('SELECT FROM_UNIXTIME( ( UNIX_TIMESTAMP(time) DIV (15* 60) ) * (15*60) ) time , counter , SUM(count) count FROM umb.ussdnode72 WHERE counter ="FAILED_PROVIDER_ABORT" GROUP BY UNIX_TIMESTAMP(time) DIV (15* 60) desc')->row();  
  17.         $ABORT_APP = $this->db->query('SELECT FROM_UNIXTIME( ( UNIX_TIMESTAMP(time) DIV (15* 60) ) * (15*60) ) time , counter , SUM(count) count FROM umb.ussdnode72 WHERE counter ="ABORT_APP" GROUP BY UNIX_TIMESTAMP(time) DIV (15* 60) desc')->row();  
  18.         $SRI_DIALOG_REJECTED  = $this->db->query('SELECT FROM_UNIXTIME( ( UNIX_TIMESTAMP(time) DIV (15* 60) ) * (15*60) ) time , counter , SUM(count) count FROM umb.ussdnode72 WHERE counter ="SRI_DIALOG_REJECTED" GROUP BY UNIX_TIMESTAMP(time) DIV (15* 60) desc')->row();  
  19.         $SRI_PROVIDER_ABORT  = $this->db->query('SELECT FROM_UNIXTIME( ( UNIX_TIMESTAMP(time) DIV (15* 60) ) * (15*60) ) time , counter , SUM(count) count FROM umb.ussdnode72 WHERE counter ="SRI_PROVIDER_ABORT" GROUP BY UNIX_TIMESTAMP(time) DIV (15* 60) desc')->row();  
  20.         $SRI_DIALOG_USER_ABORT = $this->db->query('SELECT FROM_UNIXTIME( ( UNIX_TIMESTAMP(time) DIV (15* 60) ) * (15*60) ) time , counter , SUM(count) count FROM umb.ussdnode72 WHERE counter ="SRI_DIALOG_USER_ABORT" GROUP BY UNIX_TIMESTAMP(time) DIV (15* 60) desc')->row();  
  21.         $SRI_DIALOG_TIMEOUT = $this->db->query('SELECT FROM_UNIXTIME( ( UNIX_TIMESTAMP(time) DIV (15* 60) ) * (15*60) ) time , counter , SUM(count) count FROM umb.ussdnode72 WHERE counter ="SRI_DIALOG_TIMEOUT" GROUP BY UNIX_TIMESTAMP(time) DIV (15* 60) desc')->row();  
  22.         $SRI_MAP_REJECT_COMPONENT = $this->db->query('SELECT FROM_UNIXTIME( ( UNIX_TIMESTAMP(time) DIV (15* 60) ) * (15*60) ) time , counter , SUM(count) count FROM umb.ussdnode72 WHERE counter ="SRI_MAP_REJECT_COMPONENT" GROUP BY UNIX_TIMESTAMP(time) DIV (15* 60) desc')->row();  
  23.         $SRI_ABSENT_SUBSCRIBER = $this->db->query('SELECT FROM_UNIXTIME( ( UNIX_TIMESTAMP(time) DIV (15* 60) ) * (15*60) ) time , counter , SUM(count) count FROM umb.ussdnode72 WHERE counter ="SRI_ABSENT_SUBSCRIBER" GROUP BY UNIX_TIMESTAMP(time) DIV (15* 60) desc')->row();  
  24.         $SRI_CALL_BARRED = $this->db->query('SELECT FROM_UNIXTIME( ( UNIX_TIMESTAMP(time) DIV (15* 60) ) * (15*60) ) time , counter , SUM(count) count FROM umb.ussdnode72 WHERE counter ="SRI_CALL_BARRED" GROUP BY UNIX_TIMESTAMP(time) DIV (15* 60) desc')->row();  
  25.         $SRI_TELESERVICE_NOT_PROVISIONED = $this->db->query('SELECT FROM_UNIXTIME( ( UNIX_TIMESTAMP(time) DIV (15* 60) ) * (15*60) ) time , counter , SUM(count) count FROM umb.ussdnode72 WHERE counter ="SRI_TELESERVICE_NOT_PROVISIONED" GROUP BY UNIX_TIMESTAMP(time) DIV (15* 60) desc')->row();  
  26.         $SRI_UNKNOWN_SUBSCRIBER = $this->db->query('SELECT FROM_UNIXTIME( ( UNIX_TIMESTAMP(time) DIV (15* 60) ) * (15*60) ) time , counter , SUM(count) count FROM umb.ussdnode72 WHERE counter ="SRI_UNKNOWN_SUBSCRIBER" GROUP BY UNIX_TIMESTAMP(time) DIV (15* 60) desc')->row();  
  27.         $SRI_MAP_ERROR_COMPONENT = $this->db->query('SELECT FROM_UNIXTIME( ( UNIX_TIMESTAMP(time) DIV (15* 60) ) * (15*60) ) time , counter , SUM(count) count FROM umb.ussdnode72 WHERE counter ="SRI_MAP_ERROR_COMPONENT" GROUP BY UNIX_TIMESTAMP(time) DIV (15* 60) desc')->row();  
  28.         $FAILED_INVOKE_TIMEOUT  = $this->db->query('SELECT FROM_UNIXTIME( ( UNIX_TIMESTAMP(time) DIV (15* 60) ) * (15*60) ) time , counter , SUM(count) count FROM umb.ussdnode72 WHERE counter ="FAILED_INVOKE_TIMEOUT" GROUP BY UNIX_TIMESTAMP(time) DIV (15* 60) desc')->row();  
  29.         $FAILED_APP_TIMEOUT = $this->db->query('SELECT FROM_UNIXTIME( ( UNIX_TIMESTAMP(time) DIV (15* 60) ) * (15*60) ) time , counter , SUM(count) count FROM umb.ussdnode72 WHERE counter ="FAILED_APP_TIMEOUT" GROUP BY UNIX_TIMESTAMP(time) DIV (15* 60) desc')->row();  
  30.         $FAILED_CORRUPTED_MESSAGE = $this->db->query('SELECT FROM_UNIXTIME( ( UNIX_TIMESTAMP(time) DIV (15* 60) ) * (15*60) ) time , counter , SUM(count) count FROM umb.ussdnode72 WHERE counter ="FAILED_CORRUPTED_MESSAGE" GROUP BY UNIX_TIMESTAMP(time) DIV (15* 60) desc')->row();  
  31.         $FAILED_TRANSPORT_ERROR = $this->db->query('SELECT FROM_UNIXTIME( ( UNIX_TIMESTAMP(time) DIV (15* 60) ) * (15*60) ) time , counter , SUM(count) count FROM umb.ussdnode72 WHERE counter ="FAILED_TRANSPORT_ERROR" GROUP BY UNIX_TIMESTAMP(time) DIV (15* 60) desc')->row();  
  32.         $FAILED_TRANSPORT_FAILURE  = $this->db->query('SELECT FROM_UNIXTIME( ( UNIX_TIMESTAMP(time) DIV (15* 60) ) * (15*60) ) time , counter , SUM(count) count FROM umb.ussdnode72 WHERE counter ="FAILED_TRANSPORT_FAILURE" GROUP BY UNIX_TIMESTAMP(time) DIV (15* 60) desc')->row();  
  33.  
  34.         //total error
  35.         $totalError = $FAILED_SYSTEM_FAILURE->count + $FAILED_MAP_ERROR_COMPONENT->count +
  36.                       $FAILED_MAP_REJECT_COMPONENT->count + $ABORT_APP->count+
  37.                       $SRI_DIALOG_REJECTED->count +  $SRI_PROVIDER_ABORT +
  38.                       $SRI_DIALOG_USER_ABORT->count + $SRI_DIALOG_TIMEOUT->count +
  39.                       $SRI_MAP_REJECT_COMPONENT->count + $SRI_ABSENT_SUBSCRIBER +
  40.                       $SRI_CALL_BARRED->count + $SRI_TELESERVICE_NOT_PROVISIONED +
  41.                       $SRI_UNKNOWN_SUBSCRIBER->count + $SRI_MAP_ERROR_COMPONENT +
  42.                       $FAILED_INVOKE_TIMEOUT->count + $FAILED_APP_TIMEOUT->count +
  43.                       $FAILED_CORRUPTED_MESSAGE->count + $FAILED_TRANSPORT_ERROR->count +
  44.                       $FAILED_TRANSPORT_FAILURE->count;
  45.          
  46.      
  47.        //tampung total succes
  48.        $totalSuccess = $succes->count + $FAILED_DIALOG_TIMEOUT->count +
  49.                       $FAILED_PROVIDER_ABORT->count + $FAILED_DIALOG_USER_ABORT->count +
  50.                       $FAILED_DIALOG_REJECTED->count;
  51.         echo "<br>";
  52.         echo "total success = ".$totalSuccess  ;
  53.         echo "<br>";
  54.         echo "total error = ".$totalError;
  55.         echo "<br>";            
  56.         // total success + total error
  57.         $jumlahseluruh   = $totalSuccess + $totalError;    
  58.         // echo $jumlahseluruh;
  59.          $hasilbagi = $totalSuccess / $jumlahseluruh ;
  60.          $hasilkali = $hasilbagi * 100;
  61.          echo "hitung hasil =". $hasilkali;  
  62.          echo "<br>";          
  63.  
  64.     //   $hasilSucess = $totalSuccess/($totalSuccess + $totalError);
  65.     //   echo "hasil success ".$hasilSucess * 100;  
  66.     //   echo "<br>";
  67.      
  68.     //   $hasilError = $totalError / ($totalSuccess+$totalError);
  69.     //   echo "hasil error ". $hasilError ;
  70.  
  71.  
  72.        
  73.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top