Open ludekvodicka opened 6 years ago
Hi @ludekvodicka
Do you mean automatically connect+capture for GUI? GUI could be connected to the application which is already profiling and it will automatically show capture dialog window after connect.
However, there is no possibility to configure address + port + connect-action via command line arguments for GUI. If you want to implement or already implemented this feature - PR is totally welcome :+1:
Can I ask how to automatically connect+capture?
There is parsing of arguments in EasyMainWindow
constructor. Currently it treats first argument as file name to open.
You should search for this code:
if(QCoreApplication::arguments().size() > 1)
{
auto opened_filename = QCoreApplication::arguments().at(1);
loadFile(opened_filename);
}
After parsing address and port from command line, you need to add next code into the end of constructor:
m_addressEdit->setText(<address value from command line>);
m_portEdit->setText(QString::number(<port value from command line>));
onConnectClicked(true);
if (EASY_GLOBALS.connected && m_listener.regime() == LISTENER_IDLE)
onCaptureClicked(true);
More info about Qt QApplication arguments parsing: http://doc.qt.io/qt-5/qcoreapplication.html#accessing-command-line-arguments
@ludekvodicka is that ok that I have assigned this issue to you?
Sure, it's ok. But I can promise any term for implementation ;-). I will try it as soon as I will have some free time
Finally implemented ;-)
https://github.com/yse/easy_profiler/pull/173
Unfortunately, I wanted to do two separate PRs but both were merged to one.
Hi,
is there any way to configure listening port + run Connect action + run Capture action via command line or by any remote command?
I have EasyProfiler integrated into my testing system and would be great to be able to run benchmarks with profiling with the single click from my application.
Run tracking could be possible via command line params, stop would be a little trickier but it could be done too.
I quickly checked the source and I think there is currently no such feature. Are there any plans for this? If not but there would be interest I can try to implement it and post PR.