From b54f49b9d93d41fd6914f2a889ffba3458549fdb Mon Sep 17 00:00:00 2001 From: Aleksandr Date: Wed, 7 Jul 2021 16:34:25 +0300 Subject: [PATCH] Update LiveProfiler.php Ability to exclude an array of functions from their profiled result --- src/Badoo/LiveProfiler/LiveProfiler.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/Badoo/LiveProfiler/LiveProfiler.php b/src/Badoo/LiveProfiler/LiveProfiler.php index e602b91..a1c09a0 100644 --- a/src/Badoo/LiveProfiler/LiveProfiler.php +++ b/src/Badoo/LiveProfiler/LiveProfiler.php @@ -52,7 +52,9 @@ class LiveProfiler protected $is_enabled = false; /** @var array */ protected $last_profile_data = []; - + /** @var array[] */ + protected $ignored_functions = ['ignored_functions' => []]; + /** * LiveProfiler constructor. * @param string $connection_string_or_path @@ -494,6 +496,17 @@ public function setDataPacker($DataPacker) return $this; } + /** + * @param array $ignore + * @return $this + */ + public function setIgnoredFunctions($ignore) + { + $this->ignored_functions = array("ignored_functions" => $ignore); + + return $this; + } + /** * @return array */