Giter VIP home page Giter VIP logo

laravel-xhprof's People

Contributors

a-bashtannik avatar imanghafoori1 avatar sairahcaz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

laravel-xhprof's Issues

How about encapsulating the frontend part?

Hey

I have some ideas on how to make the package better considering you depend on https://github.com/preinheimer/xhprof - one of the ugliest things I have ever seen lol.

How about making 2 things:

  • Encapsulate the https://github.com/preinheimer/xhprof into a resource package to avoid repository clone operation.
  • Make everything configurable in a standard laravel way - today we have to keep 2 copies of the configuration, one for the application and one for the cloned ignored directory.

We can start on these changes and move forward step by step making the profiling process great.

Fix the migration

While working with postgresql, I faced a small problem running the migration,

   INFO  Running migrations.

  2022_10_25_094737_create_xhprof_table .................................................................................................. 42ms FAIL

   Illuminate\Database\QueryException

  SQLSTATE[42601]: Syntax error: 7 ERROR:  syntax error at or near "ON"
LINE 1: ...hout time zone not null default CURRENT_TIMESTAMP ON UPDATE ...
                                                             ^ (SQL: create table "details" ("idcount" bigserial primary key not null, "id" char(64) not null, "url" char(255) null, "c_url" char(255) null, "timestamp" timestamp(0) without time zone not null default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, "server name" char(64) null, "perfdata" bytea null, "type" smallint null, "cookie" bytea null, "post" bytea null, "get" bytea null, "pmu" integer null, "wt" integer null, "cpu" integer null, "server_id" char(64) null, "aggregateCalls_include" char(255) null))

  at vendor/laravel/framework/src/Illuminate/Database/Connection.php:760
    756▕         // If an exception occurs when attempting to run a query, we'll format the error
    757▕         // message to include the bindings with SQL, which will make this exception a
    758▕         // lot more helpful to the developer instead of just the database's errors.
    759▕         catch (Exception $e) {
  ➜ 760▕             throw new QueryException(
    761▕                 $query, $this->prepareBindings($bindings), $e
    762▕             );
    763▕         }
    764▕     }

      +9 vendor frames
  10  database/migrations/2022_10_25_094737_create_xhprof_table.php:41
      Illuminate\Support\Facades\Facade::__callStatic("create")

      +26 vendor frames
  37  artisan:37
      Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

so I guess it is better to change

$table->timestamp('timestamp')->default(DB::raw('CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP'));

to

$table->timestamp('timestamp')->useCurrent()->useCurrentOnUpdate();

which in my case fixed the problem :D

[1.x] id column has not index!

Version

v1.0.9

Database Driver

MySQL

Description

I created details table using the following command:
php artisan vendor:publish --provider="LaracraftTech\LaravelXhprof\XHProfServiceProvider" --tag="migrations"

I was able to view the xhprof page the first time, but after a while, the xhprof page timed out. I found the following slow query in the MySQL slow query log:

`SELECT * FROM `details` WHERE `id` = '651e3280bba53';`

OMG, I discovered that the id column in the details table does not have an index!

The id column requires an index, perhaps even a unique key instead of just an index.

sudo: add-apt-repository: command not found

When trying to install the extension, I get the following error on Mac OS Monterey

➜  ~ sudo add-apt-repository ppa:ondrej/php

Password:
sudo: add-apt-repository: command not found
➜  ~ 


Suggest adding a UI for XHProf reports to your library

Dear developers of laravel-xhprof,

I am a user of your library and I appreciate the work you have put into creating this valuable tool for profiling Laravel applications. I have noticed that the library currently does not include a user interface for viewing XHProf reports. Instead, users need to download and configure the UI separately.

I would like to suggest that you consider adding a UI for XHProf reports to your library. One possible UI that could be included is the one available at [email protected]:preinheimer/xhprof.git.

Including a UI in your library would make it much easier for users to get up and running with XHProf. It would also streamline the configuration process, as users would not need to manually add configuration files to their Laravel installation.

Thank you for considering my suggestion. I look forward to seeing how your library continues to evolve and improve in the future.

Best regards,

[fh32000]

Different Database

Need to add in config to select Different connection of database and add to migrations Schema::connection(config('connection))->create

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.