Can the machinery of property based testing be applied to profiling?
-
-
A bit, yeah. You specify a program that's parameterized by scalar N, and a bunch of internal performance counters you can read off, and then a property that's an expected observation of the scaling of the counters, as a given polynomial or exponential in terms of N.
-
Code is here: https://github.com/apple/swift/blob/master/utils/scale-test … (Bonus: since installing numpy on build hosts isn't super easy, I got to hand-implement Nelder-Mead simplex! Dawww..)
-
Nice. That was a rapid journey from a curiosity to code to read. Thank you!
-
Happy to have a chance to mention it, would like it to spread :) In practice it works pretty well once users get over the hump. Wind up with reasonably small/stable tests like "foo should be linear in bar" +/- a couple dev-chosen empirical constants, eg.:https://github.com/apple/swift/blob/master/validation-test/compiler_scale/bind_extension_decl.gyb …
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.