forked from NEKOGET/FuelPHP_docs_jp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofiler.html
196 lines (185 loc) · 5.41 KB
/
profiler.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<!doctype html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./../assets/css/combined.css">
<link rel="shortcut icon" href="./../favicon.ico" />
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
var path = './../';
var class_prefix = "Profiler::";
</script>
<script src="./../assets/js/combined.js"></script>
<title>Profiler - クラス - FuelPHP ドキュメント</title>
</head>
<body>
<div id="container">
<header id="header">
<div class="table">
<h1>
<a href="http://fuelphp.com"><img height="37px" width="147px" src="./../assets/img/fuel.png" /></a>
<strong>Documentation</strong>
</h1>
<form id="google_search">
<p>
<span id="search_clear"> </span>
<input type="submit" name="search_submit" id="search_submit" value="検索" />
<input type="text" value="" id="search_input" name="search_input" />
</p>
</form>
</div>
<nav>
<div class="clear"></div>
</nav>
<a href="#" id="toc_handle">目次</a>
<div class="clear"></div>
</header>
<div id="cse">
<div id="cse_point"></div>
<div id="cse_content"></div>
</div>
<div id="main">
<h2>Profiler クラス</h2>
<p><strong>Profiler クラス</strong>を使うと、独自のプロファイリング情報をプロファイラに送ることができます。</p>
<article>
<h4 class="method" id="method_mark">mark($label)</h4>
<p>
<strong>mark</strong> はスピードマーカーをプロファイラに追加します。
追加されたマーカーはプロファイラの "Load Time" セクションで確認することができます。
</p>
<table class="method">
<tbody>
<tr>
<th>静的</th>
<td>はい</td>
</tr>
<tr>
<th>パラメータ</th>
<td>
<table class="parameters">
<tr>
<th>パラメータ</th>
<th>デフォルト</th>
<th>説明</th>
</tr>
<tr>
<th><kbd>$label</kbd></th>
<td><i>必須</i></td>
<td>スピードマーカーの説明</td>
</tr>
</table>
</td>
</tr>
<tr>
<th>返り値</th>
<td>void</td>
</tr>
<tr>
<th>例</th>
<td>
<pre class="php"><code>Profiler::mark('これはメソッドの開始地点です');</code></pre>
</td>
</tr>
</tbody>
</table>
</article>
<article>
<h4 class="method" id="method_mark_memory">mark_memory($var, $name)</h4>
<p>
<strong>mark_memory</strong>はメモリマーカーをプロファイラに追加します。<br/>
変数を渡した場合、その変数のメモリ使用量が記録されます。
そうでない場合は、その時点でのメモリ使用量が記録されます。
</p>
<table class="method">
<tbody>
<tr>
<th>静的</th>
<td>はい</td>
</tr>
<tr>
<th>パラメータ</th>
<td>
<table class="parameters">
<tr>
<th>パラメータ</th>
<th>デフォルト</th>
<th>説明</th>
</tr>
<tr>
<th><kbd>$var</kbd></th>
<td><kbd>false</kbd></td>
<td>サイズを取得したい変数。もし、falseを渡すか、何も渡さない場合は全体のメモリ使用量が記録されます。</td>
</tr>
<tr>
<th><kbd>$name</kbd></th>
<td><kbd>'Memory Usage'</kbd></td>
<td>マーカーの説明</td>
</tr>
</table>
</td>
</tr>
<tr>
<th>返り値</th>
<td>void</td>
</tr>
<tr>
<th>例</th>
<td>
<pre class="php"><code>Profiler::mark_memory($this, 'Controller_Welcome オブジェクトです');</code></pre>
</td>
</tr>
</tbody>
</table>
</article>
<article>
<h4 class="method" id="method_console">console($text)</h4>
<p>
<strong>console</strong> メソッドはログをプロファイラに追加します。
</p>
<table class="method">
<tbody>
<tr>
<th>静的</th>
<td>はい</td>
</tr>
<tr>
<th>パラメータ</th>
<td>
<table class="parameters">
<tr>
<th>パラメータ</th>
<th>デフォルト</th>
<th>説明</th>
</tr>
<tr>
<th><kbd>$text</kbd></th>
<td><i>必須</i></td>
<td>プロファイラへ追加するログ</td>
</tr>
</table>
</td>
</tr>
<tr>
<th>返り値</th>
<td>void</td>
</tr>
<tr>
<th>例</th>
<td>
<pre class="php"><code>Profiler::console('start of this piece of code');</code></pre>
</td>
</tr>
</tbody>
</table>
</article>
</div>
<footer>
<p>
© FuelPHP Development Team 2010-2016 - <a href="http://fuelphp.com">FuelPHP</a> is released under the MIT license.
[ <a href="https://github.com/fuel/docs/commits/1.8/develop/classes/profiler.html">原文コミット履歴</a> | <a href="https://github.com/NEKOGET/FuelPHP_docs_jp/commits/1.8/develop_japanese/classes/profiler.html">翻訳コミット履歴</a> | <a href="https://github.com/NEKOGET/FuelPHP_docs_jp/blob/1.8/develop_japanese/classes/profiler.html">GitHubで修正</a> ]
</p>
</footer>
</div>
</body>
</html>