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
F14759676: D19566.diff
Wed, Jan 22, 1:40 PM
F14757028: D19566.diff
Tue, Jan 21, 10:45 PM
Unknown Object (File)
Tue, Jan 21, 9:17 AM
Unknown Object (File)
Fri, Jan 3, 8:17 PM
Unknown Object (File)
Thu, Jan 2, 9:41 PM
Unknown Object (File)
Tue, Dec 31, 7:30 PM
Unknown Object (File)
Mon, Dec 30, 9:19 AM
Unknown Object (File)
Mon, Dec 30, 9:19 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
Branch
conduit1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 20578
Build 27952: Run Core Tests
Build 27951: arc lint + arc unit