diff --git a/benchmarks.html b/benchmarks.html new file mode 100644 index 0000000..336605b --- /dev/null +++ b/benchmarks.html @@ -0,0 +1,1074 @@ + + + + + criterion report + + + + + + + +
+
+

criterion performance measurements

+ +

overview

+ +

want to understand this report?

+ +
+ +

unary request

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
lower boundestimateupper bound
OLS regressionxxxxxxxxx
R² goodness-of-fitxxxxxxxxx
Mean execution time1.1127952052099233e-41.1157779769569623e-41.1222578474109467e-4
Standard deviation7.006642862776891e-71.6019470204849632e-63.0016649862884594e-6
+ + +

Outlying measurements have slight + (8.197243287309262e-2%) + effect on estimated standard deviation.

+
+

client stream: 100 messages

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
lower boundestimateupper bound
OLS regressionxxxxxxxxx
R² goodness-of-fitxxxxxxxxx
Mean execution time1.1145656673217617e-31.1225264180385309e-31.136100231001483e-3
Standard deviation2.1175077057984874e-53.660369985889931e-56.0245576168224164e-5
+ + +

Outlying measurements have moderate + (0.2100730004584609%) + effect on estimated standard deviation.

+
+

client stream: 1k messages

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
lower boundestimateupper bound
OLS regressionxxxxxxxxx
R² goodness-of-fitxxxxxxxxx
Mean execution time1.0274288101958585e-21.0341389459833119e-21.0418416003070792e-2
Standard deviation1.5974251878414234e-42.0913496502759373e-42.889361409397357e-4
+ + +

Outlying measurements have slight + (3.222222222222209e-2%) + effect on estimated standard deviation.

+
+

client stream: 10k messages

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
lower boundestimateupper bound
OLS regressionxxxxxxxxx
R² goodness-of-fitxxxxxxxxx
Mean execution time0.10351395223852060.10443575532386540.10589733927787692
Standard deviation8.693634002187114e-41.7581790983451108e-32.6984798923229657e-3
+ + +

Outlying measurements have slight + (9.876543209876533e-2%) + effect on estimated standard deviation.

+
+

server stream: 100 messages

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
lower boundestimateupper bound
OLS regressionxxxxxxxxx
R² goodness-of-fitxxxxxxxxx
Mean execution time1.00500185533956e-31.0219297837648412e-31.038431407924066e-3
Standard deviation4.534639216316358e-55.8708277292223296e-57.292687430223964e-5
+ + +

Outlying measurements have moderate + (0.4697581699045145%) + effect on estimated standard deviation.

+
+

server stream: 1k messages

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
lower boundestimateupper bound
OLS regressionxxxxxxxxx
R² goodness-of-fitxxxxxxxxx
Mean execution time8.263458511284804e-38.29655676830788e-38.338747504141219e-3
Standard deviation7.989147957982453e-51.1338955133128914e-41.6239809568186118e-4
+ + +

Outlying measurements have slight + (2.938475665748384e-2%) + effect on estimated standard deviation.

+
+

server stream: 10k messages

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
lower boundestimateupper bound
OLS regressionxxxxxxxxx
R² goodness-of-fitxxxxxxxxx
Mean execution time8.139915127469478e-28.203977915769449e-28.294207157255142e-2
Standard deviation8.712272680628149e-41.303323554210239e-31.75288845055683e-3
+ + +

Outlying measurements have slight + (9.000000000000001e-2%) + effect on estimated standard deviation.

+
+

bidi stream: 50 messages up, 50 down

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
lower boundestimateupper bound
OLS regressionxxxxxxxxx
R² goodness-of-fitxxxxxxxxx
Mean execution time3.6837263323658102e-33.690185989917211e-33.7016024806948455e-3
Standard deviation1.87435230068336e-52.7406270029965376e-53.868689618608243e-5
+ + +

Outlying measurements have slight + (2.1266540642722116e-2%) + effect on estimated standard deviation.

+
+

bidi stream: 500 message up, 500 down

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
lower boundestimateupper bound
OLS regressionxxxxxxxxx
R² goodness-of-fitxxxxxxxxx
Mean execution time3.539779838485038e-23.5467452958929724e-23.5585300045038584e-2
Standard deviation1.1602363892840695e-41.603301186146598e-42.1296560804213925e-4
+ + +

Outlying measurements have slight + (5.8593749999999986e-2%) + effect on estimated standard deviation.

+
+

bidi stream: 5000 messages up, 5000 down

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
lower boundestimateupper bound
OLS regressionxxxxxxxxx
R² goodness-of-fitxxxxxxxxx
Mean execution time0.35194120436214790.352078467508753430.3521320771337429
Standard deviation0.01.2712910344311448e-41.4489214967143587e-4
+ + +

Outlying measurements have moderate + (0.1875%) + effect on estimated standard deviation.

+
+ +

understanding this report

+ +

In this report, each function benchmarked by criterion is assigned + a section of its own. The charts in each section are active; if + you hover your mouse over data points and annotations, you will see + more details.

+ + + +

Under the charts is a small table. + The first two rows are the results of a linear regression run + on the measurements displayed in the right-hand chart.

+ + + +

We use a statistical technique called + the bootstrap + to provide confidence intervals on our estimates. The + bootstrap-derived upper and lower bounds on estimates let you see + how accurate we believe those estimates to be. (Hover the mouse + over the table headers to see the confidence levels.)

+ +

A noisy benchmarking environment can cause some or many + measurements to fall far from the mean. These outlying + measurements can have a significant inflationary effect on the + estimate of the standard deviation. We calculate and display an + estimate of the extent to which the standard deviation has been + inflated by outliers.

+ + + +
+
+ + + diff --git a/src/Network/GRPC/LowLevel/Server.hs b/src/Network/GRPC/LowLevel/Server.hs index bddd825..22349fd 100644 --- a/src/Network/GRPC/LowLevel/Server.hs +++ b/src/Network/GRPC/LowLevel/Server.hs @@ -84,11 +84,11 @@ forkServer Server{..} f = do False -> do tid <- forkFinally f cleanup atomically $ modifyTVar' outstandingForks (S.insert tid) - #ifdef DEBUG +#ifdef DEBUG currSet <- readTVarIO outstandingForks grpcDebug $ "forkServer: number of outstandingForks is " ++ show (S.size currSet) - #endif +#endif return True where cleanup _ = do tid <- myThreadId