search
HomeBackend DevelopmentPHP7How to do performance testing for PHP7
How to do performance testing for PHP7Jun 24, 2020 pm 05:37 PM
phpPerformance Testing

How to do performance testing for PHP7

After we test the performance of PHP7 with some simple loop programs, will the focus shift to PHP applications? There is such a question, PHP7's performance has indeed exploded, but when our application is really run with PHP7, will the performance also improve so much?


#A big event has happened in the IT world these days, that is, PHP has released the latest version, and PHP7 finally meets phper.

Many programmers who pay attention to PHP must have browsed various forums in the past two days and read all the major posts. They know that the biggest breakthrough of PHP7 this time is the performance improvement, which is known as 100%! From the test data given by various experts, we can also see that it may be far from this number, much higher than the conservative estimate of 100%. So the question is, after we test the performance of PHP7 with some simple loop programs, will the focus shift to PHP applications? There is such a question, PHP7's performance has indeed exploded, but when our application is really run with PHP7, will the performance also improve so much?

I want to tell you that’s not the case! why? How was it tested? Maybe you are about to ask, but now I want to tell you that we can actually do these things with the help of some mature application performance testing products. I know that the performance of PHP7 has been improved, but the performance of the application I want to run on PHP7 is also equally high. I need to see it clearly, so here is the tool: I have used some relatively good products, and I will share them with you. Recommended:

1. XHprof

Those who have learned about performance monitoring must be familiar with XHprof. xhprof - an extension developed by Facebook to test PHP performance. This is the entire explanation given by the open source Chinese community. It is one sentence but very awesome. Because it was developed by Facebook, it is naturally not bad. But from the same perspective, because it was developed by Facebook, its deployment difficulty and technical requirements are naturally not low. Anyone who has tried it must know it. And because of Facebook's huge amount of data, the data displayed to us by this tool is not that accurate and the display method is indeed not very friendly. Although I am a programmer, I can only say that after watching it for a long time, I felt it was too stiff.

2. Blackfire

Blackfire Profiler Fire up your PHP App Performance translates to clearly display your application performance. This tool is very powerful, really powerful. It is an application performance monitoring tool specially made for PHP applications. Because it is specially used to monitor PHP applications, it has achieved all aspects of the monitoring functions of PHP applications. The most important problem is that I have only seen their product demos on the official website and have never used their products. It's not that I don't want to, but I really can't do anything. I have deployed it countless times and searched through the problem-solving documents on the official website, but I have not been able to successfully deploy this tool. In the end, I was defeated and could only find a product that was easy to deploy and equally powerful.

3、OneAPM

Sometimes some products are right in front of you, but you just don’t find them. After you see them and use them for a while, you will find that maybe this is the product you have always wanted. That's right, it's OneAPM. You may think that I am saying this and praising him is a bit too much. Well, let me tell you how long it took me from seeing OneAPM to seeing my application performance data - 7 minutes. That's right, it only took 14 minutes from download and installation to the various performance data I saw (response time, throughput, etc.). It’s not very short, but I spent nearly two days on XHprof. The leader of blackfire saw this tool at the time and asked me to write a test report. I worked on it for 3 days but failed to deploy it successfully. In the end, thanks to the leader’s understanding, he tried it. It seemed that in the end Let's just leave it alone. I don't need to tell you what the result will be! And in terms of performance data, I think OneAPM is not much different from those two, but OneAPM's functions are more powerful: reports, error messages, server status, slow transaction tracking, etc., all make me feel bright.

Recommended tutorial: "php video tutorial"

The above is the detailed content of How to do performance testing for PHP7. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:CSDN. If there is any infringement, please contact admin@php.cn delete
php怎么把负数转为正整数php怎么把负数转为正整数Apr 19, 2022 pm 08:59 PM

php把负数转为正整数的方法:1、使用abs()函数将负数转为正数,使用intval()函数对正数取整,转为正整数,语法“intval(abs($number))”;2、利用“~”位运算符将负数取反加一,语法“~$number + 1”。

php怎么实现几秒后执行一个函数php怎么实现几秒后执行一个函数Apr 24, 2022 pm 01:12 PM

实现方法:1、使用“sleep(延迟秒数)”语句,可延迟执行函数若干秒;2、使用“time_nanosleep(延迟秒数,延迟纳秒数)”语句,可延迟执行函数若干秒和纳秒;3、使用“time_sleep_until(time()+7)”语句。

php怎么除以100保留两位小数php怎么除以100保留两位小数Apr 22, 2022 pm 06:23 PM

php除以100保留两位小数的方法:1、利用“/”运算符进行除法运算,语法“数值 / 100”;2、使用“number_format(除法结果, 2)”或“sprintf("%.2f",除法结果)”语句进行四舍五入的处理值,并保留两位小数。

php怎么根据年月日判断是一年的第几天php怎么根据年月日判断是一年的第几天Apr 22, 2022 pm 05:02 PM

判断方法:1、使用“strtotime("年-月-日")”语句将给定的年月日转换为时间戳格式;2、用“date("z",时间戳)+1”语句计算指定时间戳是一年的第几天。date()返回的天数是从0开始计算的,因此真实天数需要在此基础上加1。

php怎么判断有没有小数点php怎么判断有没有小数点Apr 20, 2022 pm 08:12 PM

php判断有没有小数点的方法:1、使用“strpos(数字字符串,'.')”语法,如果返回小数点在字符串中第一次出现的位置,则有小数点;2、使用“strrpos(数字字符串,'.')”语句,如果返回小数点在字符串中最后一次出现的位置,则有。

php字符串有没有下标php字符串有没有下标Apr 24, 2022 am 11:49 AM

php字符串有下标。在PHP中,下标不仅可以应用于数组和对象,还可应用于字符串,利用字符串的下标和中括号“[]”可以访问指定索引位置的字符,并对该字符进行读写,语法“字符串名[下标值]”;字符串的下标值(索引值)只能是整数类型,起始值为0。

php怎么替换nbsp空格符php怎么替换nbsp空格符Apr 24, 2022 pm 02:55 PM

方法:1、用“str_replace(" ","其他字符",$str)”语句,可将nbsp符替换为其他字符;2、用“preg_replace("/(\s|\&nbsp\;||\xc2\xa0)/","其他字符",$str)”语句。

php怎么查找字符串是第几位php怎么查找字符串是第几位Apr 22, 2022 pm 06:48 PM

查找方法:1、用strpos(),语法“strpos("字符串值","查找子串")+1”;2、用stripos(),语法“strpos("字符串值","查找子串")+1”。因为字符串是从0开始计数的,因此两个函数获取的位置需要进行加1处理。

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)