Home > Backend Development > PHP Tutorial > A docker image for viewing xhprof data files

A docker image for viewing xhprof data files

藏色散人
Release: 2023-04-09 17:10:02
forward
3727 people have browsed it

Recommendation: "PHP Video Tutorial"

xhprof This tool is a tool for analyzing PHP execution. The specific usage method is not explained here. The analysis result package generated by xhprof often needs to be paired with nginx graphviz, and related files need to be configured in the specified path. But when using Windows or Mac, I often don’t want to go through the trouble of setting up a rarely used thing and configuring it just to read a report, so I have always planned to make a mirror, just start it directly and drag the data package in when using it. After intermittent testing, I finally got it here and share it with those who need it:

docker pull 1000172/xhprof_graphviz:v1
Copy after login

The following is a usage example:

  • You can specify the port to start the container
    docker run --name tn -p 8888:80 -d 1000172/xhprof_graphviz:v1
    Copy after login
  • Enter the folder where the xhprof data package is generated and copy the file to the location specified by docker
    [MacBook:var root$] cd xhprof/[MacBook:xhprof root$] ls5fd97077636fb.api_demo.xhprof    5fd9708466af4.api_demo.xhprof
    //主要是下面这步[MacBook:xhprof root$] docker cp 5fd9708466af4.api_demo.xhprof tn:/usr/share/nginx/data
    Copy after login
    . Open the browser and enter: localhost:8888/xhprof_html/
    You can see it

    Click the link to enter
    You can see it Go to the analysis report. Because the drawing tool is already installed in the image, you can click directly to view the analysis flow chart.
    If there are other good analysis tools that need to be packaged and embedded with a welcome message, I will test them and type them in before sharing them when I have time

The above is the detailed content of A docker image for viewing xhprof data files. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:learnku.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template