Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

How can I generate a plot like the following in R.

enter image description here

It shows the percent of transactions (x) for a given response time (y), see my own answer below for my own go at it.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
644 views
Welcome To Ask or Share your Answers For Others

1 Answer

Methinks you want a plot of an empirical cumulative distribution function.

So take a look at the documentation for ecdf() as well as the more featureful Ecdf() in the CRAN package Hmisc.

Hmisc Ecdf example: ExecTm array of execution times, HttpProvCall array of time it took to call downstream system and we compare the time we spend with the downstream system with percentiles

> library(Hmisc)
> x <- c(ExecTm,ExecTm-HttpProvCall)
> g <- c(rep('ExecTm',length(ExecTm)),rep('ExecTm-HttpProvCall',length(ExecTm)))
> Ecdf(x, group=g, xlab='Test Results', 
+     label.curves=list(keys=1:2),q=c(.90,.95,.98))

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...