drush-ops / drush

Drush is a command-line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those who spend their working hours hacking away at the command prompt.
https://www.drush.org
2.33k stars 1.08k forks source link

--xh-link link generation could be smarter #4249

Open mikeryan776 opened 4 years ago

mikeryan776 commented 4 years ago

Is your feature request related to a problem? Please describe. It is now possible to use the Drush xhprof output with the contrib xhprof module (or will be, when my patch is merged). The link that Drush outputs, however, is hardcoded to the format {xh-link value}/index.php?run=5dc44a051cb24&source=Drush and doesn't match the module's URL (https://example.com/admin/reports/xhprof/5dc44943195ef).

Describe the solution you'd like Ideally, if one adds --xh-link with no value, and the xhprof module is enabled, the appropriate link to /admin/reports/xhprof/{run} would be generated. I'm not sure building knowledge of a specific contrib module (without an official D8 release, at that) is appropriate, however.

Describe alternatives you've considered Simpler would be if it simply appended /{run} to the provided xh-link. One could get the original behavior with --xh-link=http://example.com/index.php?source=Drush&run-, while xhprof module users can use --xh-link=https://example.com/admin/reports/xhprof/.

Additional context Add any other context or screenshots about the feature request here.

weitzman commented 4 years ago

Seems like a reasonable proposal.

weitzman commented 4 years ago

It is now possible to pass --xh-link with no value. Drush wont provide a link and you have to browse your XHProf UI to find the results. I'd consider a PR to do the admin/reports link generation.

andypost commented 4 years ago

++ to extend management of sources for reports! Btw found Issue for that