The query and analysis function of Log Service supports analyzing logs by using mathematical statistics functions. The specific statements and meanings are as follows.
Statements | Meaning | Example |
---|---|---|
corr(y, x) |
Returns the correlation coefficient of two columns. The result is from 0 to 1. | latency>100| select corr(latency,request_size) |
covar_pop(y, x) |
Calculates the population covariance. | latency>100| select covar_pop(request_size,latency) |
covar_samp(y, x) |
Calculates the sample covariance. | Latency> 100 | select covar_samp(request_size,latency) |
regr_intercept(y, x) |
Returns the linear regression intercept of input values. y is the dependent value. x is the independent value. | latency>100| select regr_intercept(request_size,latency) |
regr_slope(y,x) |
Returns the linear regression slope of input values. y is the dependent value. x is the independent value. | latency>100| select regr_slope(request_size,latency) |
stddev(x) or stddev_samp(x) |
Returns the sample standard deviation of column x. | latency>100| select stddev(latency) |
stddev_pop(x) |
Returns the population standard deviation of column x. | latency>100| select stddev_pop(latency) |
variance(x) or Var_samp (X) |
Calculates the sample variance of column x. | latency>100| select variance(latency) |
var_pop(x) |
Calculates the population variance of column x. | latency>100| select variance(latency) |