papertrail / papertrail-cli

Command-line client for Papertrail hosted syslog & app log management service
http://papertrailapp.com/
MIT License
427 stars 46 forks source link

Add CLI option for group id #94

Closed bryanlb closed 6 years ago

bryanlb commented 7 years ago

Since the group id api query is slow, this allows bypassing the group id lookup.

The specifics of this PR are simply a suggestion - providing an option to manually specify the group ID however would drastically speed up the time to execute queries. Benchmarking locally I can get results from papertrail -f reporting in ~ 2 seconds, where papertrail -g "XXX" -f takes ~ 68 seconds. The group id api lookup is taking over 1 min, regardless of which group is chosen.

markdascher commented 6 years ago

Thanks @bryanlb! We're now working on some API updates that'll allow lookups of group, system, and saved search IDs to incur a lot less overhead. Making the API fast seemed like a better overall experience than forcing everyone to translate group names to IDs by hand. =)

Once that's done, we'll adjust the CLI to take advantage of the new features, and cut a new release.

markdascher commented 6 years ago

The speed improvements are now incorporated into the latest v0.10.4 release. Please let us know if this is still a problem, though.

bryanlb commented 6 years ago

@markdascher just had a chance to install the latest and test it. Much better now, and doesn't necessitate the fork anymore. 👍