@@ -35,19 +35,19 @@ microtime by yourself. Instead, use the simple
35
35
// ... some code goes here
36
36
$event = $stopwatch->stop('eventName');
37
37
38
- You also can provide a category name to an event::
38
+ You can also provide a category name to an event::
39
39
40
40
$stopwatch->start('eventName', 'categoryName');
41
41
42
- You can consider categories as a way of tagging events. The Symfony Profiler
43
- tool, for example, uses categories to nicely color-code different events.
42
+ You can consider categories as a way of tagging events. For example, the
43
+ Symfony Profiler tool uses categories to nicely color-code different events.
44
44
45
45
Periods
46
46
-------
47
47
48
- As you know from the real world, all stopwatches come with two buttons.
49
- One for starting and stopping the stopwatch, another to measure the lap time.
50
- This is exactly what the :method: `Symfony\\ Component\\ Stopwatch\\ Stopwatch::lap` `
48
+ As you know from the real world, all stopwatches come with two buttons:
49
+ one to start and stop the stopwatch, and another to measure the lap time.
50
+ This is exactly what the :method: `` Symfony\\ Component\\ Stopwatch\\ Stopwatch::lap` `
51
51
method does::
52
52
53
53
$stopwatch = new Stopwatch();
@@ -60,28 +60,28 @@ method does::
60
60
// ... some other code goes here
61
61
$event = $stopwatch->stop('foo');
62
62
63
- Lap information is stored in periods within the event. To get lap information
64
- (aka periods) call::
63
+ Lap information is stored as " periods" within the event. To get lap information
64
+ call::
65
65
66
66
$event->getPeriods();
67
67
68
- Besides getting periods, you can get other useful information from the event object.
68
+ In addition to periods, you can get other useful information from the event object.
69
69
For example::
70
70
71
- $event->getCategory(); // Returns the category the evenent was started in
72
- $event->getOrigin(); // Returns the start time of the Event in milliseconds
73
- $event->ensureStopped(); // Stops all not- already-stopped periods
74
- $event->getStartTime(); // Returns the start of the very first period
71
+ $event->getCategory(); // Returns the category the event was started in
72
+ $event->getOrigin(); // Returns the event start time in milliseconds
73
+ $event->ensureStopped(); // Stops all periods not already stopped
74
+ $event->getStartTime(); // Returns the start time of the very first period
75
75
$event->getEndTime(); // Returns the end time of the very last period
76
- $event->getDuration(); // Gets the duration ( including all periods) of the event
77
- $event->getMemory(); // Gets the max memory usage of all periods
76
+ $event->getDuration(); // Returns the event duration, including all periods
77
+ $event->getMemory(); // Returns the max memory usage of all periods
78
78
79
79
Sections
80
80
--------
81
81
82
82
Sections are a way to logically split the timeline into groups. You can see
83
- how Symfony uses sections to nicely visualize framework lifecycle in the
84
- Symfony Profiler tool. Here is a basic usage of sections::
83
+ how Symfony uses sections to nicely visualize the framework lifecycle in the
84
+ Symfony Profiler tool. Here is a basic usage example using sections::
85
85
86
86
$stopwatch = new Stopwatch();
87
87
@@ -91,8 +91,8 @@ Symfony Profiler tool. Here is a basic usage of sections::
91
91
92
92
$events = $stopwatch->getSectionEvents('routing');
93
93
94
- You can reopen a closed section by calling the openSection method and specifying
95
- an id of the section to be reopened::
94
+ You can reopen a closed section by calling the : method: ` `Symfony \\ Component \\ Stopwatch \\ Stopwatch::openSection` `
95
+ method and specifying the id of the section to be reopened::
96
96
97
97
$stopwatch->openSection('routing');
98
98
$stopwatch->start('building_config_tree');
0 commit comments