[{"data":1,"prerenderedAt":305},["ShallowReactive",2],{"project-24906237":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":27,"sentiment":28,"stance_mix":29,"scored_comments":32,"aspects":33,"strip":41,"post_text":43,"what":44,"said":82,"maker_in_thread":173,"shape":182,"grid":185,"attempts":268,"same_week":269,"maker_shows":37,"maker_hidden":297,"reader_version":298,"card":299},"24906237","Austin-Tui","Spy inside a running Python program at no performance cost","title","Show HN: Austin-Tui – Spy inside a running Python program at no performance cost","https:\u002F\u002Fgithub.com\u002FP403n1x87\u002Faustin-tui","github.com","p403n1x87",1603796905,2020,256,36,183,3028,7,"legend","dev_tools","python profiler","cli",[21,24,25,26],"sampling profiler","terminal profiler","running process profiling","curious",-0.013,{"positive":30,"neutral":18,"mixed":30,"critical":31},2,3,14,{"performance":34,"idea":36,"docs":38,"design":39,"execution":40},{"positive":35,"critical":31},0,{"positive":37,"critical":35},1,{"positive":35,"critical":35},{"positive":37,"critical":35},{"positive":35,"critical":35},[31,35,31,35,37,35,37,35,35,35,35,37,35,31,35,35,35,35,35,35,35,35,42,35,31,35,31,35,31,35,31,35,31,35,42,31],5,null,{"problem":45,"audience":57,"pricing":43,"motivation":43,"time_to_build":43,"stack":68,"openness":80,"stage":81,"team_size":81},{"value":46,"source":47,"evidence":48},"Profiling a running Python program without instrumenting it or slowing it down","commenter",[49,53],{"id":50,"by":51,"text":52},"24906587","jvns","Two other profilers that also let you spy on a running Python program: - py-spy: https:\u002F\u002Fgithub.com\u002Fbenfred\u002Fpy-spy (written in Rust) - pyflame:…",{"id":54,"by":55,"text":56},"24906783","emddudley","This is a TUI for the profiler Austin, whose README has a bit more detail on what it can do: https:\u002F\u002Fgithub.com\u002FP403n1x87\u002Faustin",{"value":58,"source":59,"evidence":60},"Python developers profiling running applications","inferred",[61,65],{"id":62,"by":63,"text":64},"24906550","tr33house","looks awesome. how easy is it to use this to profile a webapp written in a framework like django? Open-metrics? just curious",{"id":66,"by":11,"text":67},"24906657","One benefit of Austin-based tools is that they don't require any instrumentation\u002Fextra configuration. The low overhead means that you can just attach to an application that is…",[69,73],{"value":70,"source":47,"evidence":71},"C",[72],{"id":50,"by":51,"text":52},{"value":74,"source":75,"evidence":76},"curses","maker",[77],{"id":78,"by":11,"text":79},"24907053","I wrote a blog post about the technology behind the TUI https:\u002F\u002Fp403n1x87.github.io\u002Fthe-austin-tui-way-to-resourceful-text-based-user-interfaces.html It's a custom resource-based…","open_source","unknown",{"praise":83,"objections":98,"requests":112,"questions":113,"alternatives":144},[84,92],{"value":85,"source":47,"evidence":86},"Interesting TUI and low-overhead sampling approach",[87,91],{"id":88,"by":89,"text":90},"24906797","shepardrtc","Love the TUI! Which library did you use for it?",{"id":50,"by":51,"text":52},{"value":93,"source":47,"evidence":94},"Can attach to any running Python program, including ones not written by the user",[95],{"id":96,"by":51,"text":97},"24906694","Also, this kind of profiler is great because you can use it on any running Python program, which is pretty magical and very useful. (especially when it's an application you…",[99,106],{"value":100,"source":47,"evidence":101},"Claimed no performance cost is questioned; sampling uses CPU and may impact single-CPU or multi-process setups",[102,103],{"id":50,"by":51,"text":52},{"id":104,"by":11,"text":105},"24906631","All good points. The \"no performance cost\" is indeed more like \"negligible performance costs\". That's because these days multicore architectures are quite ubiquitous and standard…",{"value":107,"source":75,"evidence":108},"Statistical sampling can miss fast function calls",[109],{"id":110,"by":11,"text":111},"24906731","For these kind of things one could use https:\u002F\u002Fgithub.com\u002FP403n1x87\u002Faustin-python An early attempt at an APM that was specifically designed to measure endpoint response times was…",[],[114,124,134],{"value":115,"source":47,"evidence":116},"How does it attach to Python in Docker containers from the host",[117,121],{"id":118,"by":119,"text":120},"24913962","vvladymyrov","Can Austin attach to python process running in the docker container from the host system? `sudo austin-tui -Cp \u003Cpid>` I used pyflame for that at some point.",{"id":122,"by":11,"text":123},"24916250","That should work",{"value":125,"source":47,"evidence":126},"Does it work with Python 2 environments",[127,131],{"id":128,"by":129,"text":130},"24907932","iwebdevfromhome","Is it possible to spy from a python script running in a virtual python 2 environment?",{"id":132,"by":11,"text":133},"24908004","yep :)",{"value":135,"source":47,"evidence":136},"Difference between a TUI and a CLI",[137,141],{"id":138,"by":139,"text":140},"24907344","Pulcinella","What’s the difference between a TUI and a CLI? (Also my preferred TUI acronym is tactile user interface).",{"id":142,"by":55,"text":143},"24907399","I would say that a CLI is primarily for entering commands, while a TUI is primarily for viewing and interacting with data.",[145,153,158,166],{"value":146,"source":47,"evidence":147},"py-spy",[148,149],{"id":50,"by":51,"text":52},{"id":150,"by":151,"text":152},"24908940","benfrederickson","> you can either race with the program and hope that you read its memory to get the function stack before it changes what function it's running (and you're likely to win the…",{"value":154,"source":47,"evidence":155},"pyflame",[156,157],{"id":50,"by":51,"text":52},{"id":118,"by":119,"text":120},{"value":159,"source":47,"evidence":160},"pyinstrument",[161,162],{"id":96,"by":51,"text":97},{"id":163,"by":164,"text":165},"24906638","galacticdessert","Pyinstrument might be easier to profile web requests: https:\u002F\u002Fgithub.com\u002Fjoerick\u002Fpyinstrument#profile-a-web-request-in-django",{"value":167,"source":47,"evidence":168},"dtrace",[169],{"id":170,"by":171,"text":172},"24913042","RantyDave","Wasn't there lots of work around using dtrace for this?",{"comments":174,"answered":175,"key":176},10,6,[177,178,179],{"id":104,"text":105},{"id":110,"text":111},{"id":180,"text":181},"24907512","Running Python is not a performance cost. The meaning behind \"no performance cost\" is that a tool like this is unlikely going to impact the performance of the application that is…",{"commenters":183,"max_depth":42,"maker_replies":174,"first_comment_mins":184,"lifespan_hours":183},21,50,[186,188,190,192,194,198,200,202,205,208,211,213,214,218,220,222,223,226,229,232,235,237,240,242,244,248,250,253,255,256,258,259,261,262,264,267],[50,35,31,187,51,35],"project\u002Fmixed\u002Fperformance",[104,35,35,189,11,37],"maker\u002Fneutral\u002Fperformance",[96,35,31,191,51,35],"project\u002Fmixed\u002Fidea",[110,35,35,193,11,37],"project\u002Fneutral\u002Fidea",[195,35,37,196,197,35],"24907470","project\u002Fcritical\u002Fperformance","dTal",[180,35,35,199,11,37],"project\u002Fneutral\u002Fperformance",[201,35,37,196,197,35],"24908317",[203,35,35,204,11,37],"24908353","commenter\u002Fneutral\u002Fnone",[206,35,35,204,207,35],"24907870","Demiurge",[209,35,35,204,210,35],"24908677","junon",[212,35,35,204,210,35],"24908672",[150,35,37,196,151,35],[215,35,35,216,217,35],"24910762","other\u002Fneutral\u002Fperformance","teh_matt",[54,37,31,219,55,35],"project\u002Fneutral\u002Fdocs",[138,30,35,221,139,35],"other\u002Fneutral\u002Fnone",[142,30,35,221,55,35],[224,30,35,221,225,35],"24907491","frou_dh",[227,30,35,221,228,35],"24907550","ktpsns",[230,30,35,221,231,35],"24907579","MaxBarraclough",[233,30,35,221,234,35],"24908568","pjmlp",[236,30,35,221,210,35],"24908910",[238,30,35,221,239,35],"24912521","mehrdadn",[88,31,42,241,89,35],"project\u002Fpositive\u002Fdesign",[78,31,35,243,11,37],"maker\u002Fpositive\u002Fdocs",[245,31,31,246,247,35],"24907875","maker\u002Fneutral\u002Fdocs","kingosticks",[249,31,35,246,11,37],"24908011",[118,251,31,252,119,35],4,"project\u002Fneutral\u002Fexecution",[122,251,35,254,11,37],"maker\u002Fneutral\u002Fexecution",[62,42,31,252,63,35],[257,42,35,246,11,37],"24906569",[163,42,31,193,164,35],[66,42,35,260,11,37],"maker\u002Fpositive\u002Fperformance",[128,175,31,252,129,35],[132,175,35,263,11,37],"maker\u002Fpositive\u002Fexecution",[265,175,42,266,129,35],"24909308","project\u002Fpositive\u002Fidea",[170,18,31,193,171,35],[],[270,275,279,283,287,292],{"id":271,"name":272,"points":273,"category":274},"24898373","Dendron",313,"productivity",{"id":276,"name":277,"points":278,"category":20},"24886120","which-dns",283,{"id":280,"name":281,"points":282,"category":20},"24869897","react-chrono",269,{"id":284,"name":285,"points":286,"category":274},"24897812","Personal CRM",175,{"id":288,"name":289,"points":290,"category":291},"24872754","Perfect Pitch Ear Training",172,"learning_science",{"id":293,"name":294,"points":295,"category":296},"24920904","Blocks",133,"games",false,"v2",{"id":300,"name":5,"line":6,"ai":297,"cat":20,"year":13,"points":14,"comments":15,"rec":27,"s":301,"top":18,"kw":302,"maker":11,"domain":10,"tier":19,"attempts":35,"strip":303,"url":9,"mix":304,"praise":85,"objection":100,"sub":21},24906237,-0.01,[21,24,25,26],"303010100001030000000050303030303053",[30,18,30,31],1793991018131]