Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79897 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90181 invoked from network); 23 Dec 2014 22:13:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Dec 2014 22:13:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.177 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.212.177 mail-wi0-f177.google.com Received: from [209.85.212.177] ([209.85.212.177:42192] helo=mail-wi0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A3/44-01814-329E9945 for ; Tue, 23 Dec 2014 17:13:56 -0500 Received: by mail-wi0-f177.google.com with SMTP id l15so12109303wiw.10 for ; Tue, 23 Dec 2014 14:13:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=K3i3/dk6p7ZPZ6P8LmzPrqIrOqqBX9xis9IexX9KXRI=; b=CWE/NI4rgbMi8D9mVt0KZAcaWj05MBg5ps4YGcnYkSR6Dobi+hsZ8mqs7rcr4Vdyr1 kSrlVqcist0IcbZ4k8UYz8Makk/ZBJ57k67jBI1uE7Tmrf0nHVGxqGTc8jEMWx2qByH6 1Dmim4UpDnwFqDYVjveYNgTTt6zHpo0haJXMTJ+CXoersxekrHFMJHA3Unr8yF3ClCg+ yQw717DYXAdCDLMVUPIsQL9MVXNLvMfjPKPNS9tjZEcMrw/cwyByuzx61ujbK2m9FR7K D50Q6XtKIcZ3E3rBfNdXmW9QPh74xoBsIiq41AIe7NdmO8cVwayrCUOnYDO1m24Rjdsn lfOg== MIME-Version: 1.0 X-Received: by 10.181.13.106 with SMTP id ex10mr45248370wid.36.1419372831414; Tue, 23 Dec 2014 14:13:51 -0800 (PST) Received: by 10.27.10.196 with HTTP; Tue, 23 Dec 2014 14:13:51 -0800 (PST) In-Reply-To: References: Date: Tue, 23 Dec 2014 23:13:51 +0100 Message-ID: To: Jacob Bednarz Cc: PHP internals Content-Type: multipart/alternative; boundary=f46d043be12c6b9f02050ae97d16 Subject: Re: [PHP-DEV] Line profiler for PHP From: nikita.ppv@gmail.com (Nikita Popov) --f46d043be12c6b9f02050ae97d16 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, Dec 23, 2014 at 10:28 PM, Jacob Bednarz wrote: > Hey, > I have been working on some profiling of an application recently and > whilst xhprof and xdebug are good to get an overall picture to further > break into, I haven=E2=80=99t been able to find a tool for line by line p= rofiling > in PHP for a particular file. I have done a bit of research and found > rblineprof (https://github.com/tmm1/rblineprof) which is a line profiler > for Ruby and I would like to achieve this in PHP. > > The questions I have are: > - Is this even possible? > - Are there any projects out there or being worked on that achieve this? > - If nothing exists, I am happy to look into this however I will need som= e > guidance on best practices, caveats with profiling PHP and ways of parsin= g > the file correctly. > > Thanks! I've implemented a basic sampling profiler with line-level resolution some time ago: https://github.com/nikic/sample_prof Didn't use it since then, but maybe it still works. Nikita --f46d043be12c6b9f02050ae97d16--