nessos / perfutil Goto Github PK
View Code? Open in Web Editor NEWA simple F# utility for testing performance
A simple F# utility for testing performance
Hi,
I have a question about the usage of this library: how are you persisting the save file across runs? Are you saving it in a folder on your laptop and running it once in a while, or are you letting TeamCity or some other CI server do it?
Do you have a recommendation?
Example code resulting:
testList "performance tests" [
testPerfHistory "perf-GET" server_factory version [
perfTest "GET /" <| fun harness ->
repeat 100 (fun _ -> harness.Serve (OK "a") |> req GET "/" None |> ignore) ()
perfTest "POST / n' mirror" <| fun harness ->
repeat 100 (fun _ ->
use data = new FormUrlEncodedContent(dict [ "long", longData])
Assert.Equal("expecting form data to be returned", longData, harness.Serve (getFormValue "long") |> req POST "/" (Some data))) ()
]
]
As you can see, I have to pass it ()
at the end, because the state parameter is after the function. Perhaps it would be nicer to pass the state before the function so that I can use the
repeat 100 () <| fun _ ->
// do things
()
syntax?
The API described is out of date
Should be ImplementationComparer
Since it doesn't do means, perhaps it would be a better idea to call it WeightedComparer
?
Host unknown?
I can't find a parameter either to set the hostname with. I'm using this code:
let tester =
new PastImplementationComparer<_>(
subject, testRunId, conf.historyFile, conf.comparer,
conf.verbose, conf.throwOnError, conf.overwrite)
testCase name <| fun _ ->
let results = PerfTest.run (fun () -> tester :> PerformanceTester<'a>) tests
tester.PersistCurrentResults()
conf.handleResults(conf.historyFile, results)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.