TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

For RoR, see every method call, parameter and return value in production

122 点作者 puuush超过 1 年前

20 条评论

jmholla超过 1 年前
The calculator at the bottom of the page is doing some weird calculations. If you have no incidents a year, it still costs you money. So do incidents that take zero minutes to resolve. I took apart the code, and this seems to be the equation in use:<p><pre><code> (revenueTarget &#x2F; 8760) * resolutionTimeTarget * numIncidentsTarget * resolutionTimeTarget + numEmployeesTarget * avgEmployeeTargeRate </code></pre> This means revenue lost is correlated to the square of the lost time and the cost from employees is a static yearly cost.<p>There are a couple things wrong with it. The third * should be switched with a + and the last term need to be multiplied by the number of incidents.<p><pre><code> (revenueTarget &#x2F; 8760) * resolutionTimeTarget * numIncidentsTarget + resolutionTimeTarget * numEmployeesTarget * avgEmployeeTargeRate * numIncidentsTarget </code></pre> Which if anyone at Call Stacking is here, just means changing<p><pre><code> o = (n &#x2F; 8760) * e * t * e + i * r; </code></pre> to<p><pre><code> o = (n &#x2F; 8760) * e * t + e * i * r * t; </code></pre> or more succinctly<p><pre><code> o = t * e * (n &#x2F; 8760 + i * r) </code></pre> I&#x27;m assuming that&#x27;s minified, so<p><pre><code> numIncidentsTarget * resolutionTimeTarget * (revenueTarget &#x2F; 8760 + numEmployeesTarget * avgEmployeeRateTarget) </code></pre> Edit: With the correct math, the example is wildly different. It should be $37,277.81, not $87,991.23.
评论 #38391884 未加载
aantix超过 1 年前
If someone is up for writing a Call Stacking client for the language platform of their choice, please email me.<p>This would be your reference implementation.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;callstacking&#x2F;callstacking-rails">https:&#x2F;&#x2F;github.com&#x2F;callstacking&#x2F;callstacking-rails</a><p>I&#x27;m sure we could work out an arrangement.<p>jim@callstacking.com
aantix超过 1 年前
Here&#x27;s the client code for those that would like to inspect.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;callstacking&#x2F;callstacking-rails">https:&#x2F;&#x2F;github.com&#x2F;callstacking&#x2F;callstacking-rails</a>
stevepike超过 1 年前
How does this work on the backend? Does it only trace method calls when an exception is thrown, or does it profile the call stack of every request?<p>Something I&#x27;ve been interested in is the performance impact of using <a href="https:&#x2F;&#x2F;docs.ruby-lang.org&#x2F;en&#x2F;3.2&#x2F;Coverage.html" rel="nofollow noreferrer">https:&#x2F;&#x2F;docs.ruby-lang.org&#x2F;en&#x2F;3.2&#x2F;Coverage.html</a> to find unused code by profiling production. Particularly using that to figure out any gems that are never called in production. Seems like it could be made fast.
评论 #38385495 未加载
crystaln超过 1 年前
This is very cool and useful.<p>Also it is only necessary because of the lack of type enforcement which means no code can be relied and on and all code has to be constantly inspected for new bugs. Ugh.
评论 #38388451 未加载
评论 #38388366 未加载
评论 #38391151 未加载
theonething超过 1 年前
This is advertised as a tool for production. Seems like it would be useful in development too.
评论 #38386212 未加载
ilamparithi超过 1 年前
Recently did something similar for a java project using AOP. Basically adding an annotation to each method and logging the parameters before the method call and return values after the method call. Whenever there is an exception, a mail will be sent with the stacktrace along with the entire request path(including method calls, parameters and return values). Extremely useful for debugging and to proactively fix the issues.
评论 #38390898 未加载
mediumsmart超过 1 年前
After signup I see a typo in :<p><i>The trace URL will also be outut via the Rails log.</i><p>And the local usage section is hard to read white text on light blue background in this safari browser.
评论 #38390017 未加载
progne超过 1 年前
This is a product where the SaaS doesn&#x27;t seem to add much that couldn&#x27;t be done as easily locally, other than monetizing the process.
评论 #38385124 未加载
评论 #38385830 未加载
maz1b超过 1 年前
Pretty cool. Not sure what pricing is, seems like it&#x27;s focused for enterprise.
block_dagger超过 1 年前
Typo on front page: &quot;What&#x27;s does an hour of downtime cost you?&quot;
ysavir超过 1 年前
Would this mean that any data I happened to have in memory during the flow now permanently lives in callstacking&#x27;s data stores? How does it handle all the data flowing through from a security perspective?
评论 #38385676 未加载
评论 #38385635 未加载
kayodelycaon超过 1 年前
Some of this already exists to some degree: <a href="https:&#x2F;&#x2F;github.com&#x2F;MiniProfiler&#x2F;rack-mini-profiler">https:&#x2F;&#x2F;github.com&#x2F;MiniProfiler&#x2F;rack-mini-profiler</a>
评论 #38385455 未加载
CPLX超过 1 年前
This seems ridiculously useful. What’s the catch?
评论 #38384927 未加载
评论 #38385158 未加载
评论 #38384896 未加载
mrinterweb超过 1 年前
How does this product handle sensitive data? I&#x27;m guessing this is not a HIPAA compliant service.
评论 #38387671 未加载
saaspirant超过 1 年前
Does similar tool exist for Django &#x2F; Python?
评论 #38388675 未加载
deliriousferret超过 1 年前
Does it work for background jobs as well?
n3storm超过 1 年前
I would love to see this for Laravel.
评论 #38389954 未加载
theonething超过 1 年前
Does this handle multithreading?
berkes超过 1 年前
The irony is that the issues this helps with <i>could</i> be solved far before production. Compile time, or some local runtime even. Just not in Ruby.<p>Nearly all the issues this shows you quickly are issues that static typing would prevent compile time, or type-hints would show you in dev-time.<p>I&#x27;ve been doing fulltime Rails for 12+ years now, PHP before that, C before that. But always I developed side-gigs in Java, C# and other typed languages and now, finally fulltime over to Rust. They solve this.<p>Before production. You want this solved before production. Really.
评论 #38386011 未加载
评论 #38386273 未加载
评论 #38388000 未加载
评论 #38388167 未加载