Page MenuHomePhabricator

Add an "--as" flag to "bin/conduit call ..." to improve flexibility and ease of profiling
ClosedPublic

Authored by epriestley on Aug 8 2018, 4:10 PM.
Tags
None
Referenced Files
F15458164: D19566.id46776.diff
Sun, Mar 30, 9:23 PM
F15450674: D19566.diff
Fri, Mar 28, 5:00 PM
F15445507: D19566.id.diff
Thu, Mar 27, 2:17 PM
F15441839: D19566.diff
Wed, Mar 26, 8:17 PM
F15427682: D19566.diff
Sun, Mar 23, 3:34 PM
F15398099: D19566.id46776.diff
Sun, Mar 16, 11:16 PM
F15386404: D19566.diff
Sat, Mar 15, 12:31 AM
Unknown Object (File)
Feb 9 2025, 6:16 AM
Subscribers
None

Details

Summary

Ref T13164. In PHI801, an install reported a particular slow Conduit method call.

Conduit calls aren't easily profilable with normal tools (for example, arc call-conduit --xprofile ... gives you a profile of the client). They can be profiled most easily with bin/conduit call ... --xprofile.

However, bin/conduit call currently doesn't let you pick a user to execute the command on behalf of, so it's not terribly useful for profiling *.edit-style methods which do a write: these need a real acting user.

Test Plan

Ran bin/conduit call --method user.whoami --as epriestley ... with valid, invalid, and no acting users.

$ echo '{}' | ./bin/conduit call --method user.whoami --as epriestley --input -
Reading input from stdin...
{
  "result": {
    "phid": "PHID-USER-icyixzkx3f4ttv67avbn",
    "userName": "epriestley",
    "realName": "Evan Priestley",
...

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable