File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -436,6 +436,28 @@ You can write your own `provider` by implementing the `Provider` interface.
436436
437437You can provide your own ` dumper ` by implementing the ` Dumper ` interface.
438438
439+ TimedGeocoder
440+ -------------
441+
442+ We introduced a new feature in Geocoder 3. The ` TimedGeocoder ` profiles
443+ each ` geocode ` and ` reverse ` call. So you can easily figure out how many
444+ time/memory was spent for each geocoder/reverse call.
445+
446+ ``` php
447+ // configure you geocoder object
448+
449+ $stopwatch = new \Symfony\Component\Stopwatch\Stopwatch();
450+ $geocoder = new \Geocoder\TimedGeocoder($geocoder, $stopwatch);
451+
452+ $geocoder->geocode('Paris, France');
453+
454+ // Now you can debug your application
455+ ```
456+
457+ We use the [ symfony/stopwatch] ( http://symfony.com/doc/current/components/stopwatch.html )
458+ component under the hood. Which means, if you use the symfony framework the
459+ geocoder calls will appear in your timeline section in the webprofiler.
460+
439461
440462Versioning
441463----------
You can’t perform that action at this time.
0 commit comments