1: <?php
2: /**
3: * Rundiz Profiler
4: *
5: * @license http://opensource.org/licenses/MIT
6: */
7:
8:
9: namespace Rundiz\Profiler;
10:
11: /**
12: * Profiler based class.
13: *
14: * For access common properties between console and profiler class.
15: *
16: * @package Rundiz\Profiler
17: * @author Vee W.
18: */
19: abstract class ProfilerBase
20: {
21:
22:
23: /**
24: * log sections.<br>
25: * this property is for storing logs data for profiling process and display it in display page.
26: *
27: * @var array the array of log sections. the values should be: <br>
28: * <code>array('Logs' => array(0 => array('logtype' => 'debug', 'data' => 'data in any type', 'file' => 'file to log', 'line'=> 'line of file to log', 'time' => 'time used', 'memory' => 'memory used')))</code>, <br>
29: * <code>array('Time Load' => array(0 => array('data' => 'data in any type', 'file' => 'file to log', 'line'=> 'line of file to log', 'time' => 'time used', 'memory' => 'memory used')))</code>, <br>
30: * and more...<br>
31: * the array key logtype is for Logs only.<br>
32: * the array key file and line is not required, time and memory key is for display only.<br>
33: * the sections suggest are: Logs, Time Load, Memory Usage, Database and automatic sections are: Files, Session, Get, Post
34: */
35: protected $log_sections = [];
36:
37:
38: /**
39: * max memory usage.
40: * @var integer number of bytes of max memory usage.
41: */
42: protected $max_memory_usage;
43:
44:
45: /**
46: * application start time.
47: * @var float the value is microtime of start time.
48: */
49: protected $start_time;
50:
51:
52: /**
53: * application end time.
54: * @var float the value is microtime of end time.
55: */
56: protected $end_time;
57:
58:
59: }