Prometheus query for network monitoring in Grafana

I’m trying to visualise the traffic that passes on my network interfaces on grafana v8.5.0 by using prometheus metrics. Then, calculate the 95th percentile value.

To have an overview on the traffic In/Out on my interfaces i am using this query (which i am not sure if it’s the correct one) :

deriv(InOctet{target=~"$target"}) *8 != 0

To calculate the 95th percentile i am using this query :

quantile_over_time(0.95,sum(rate(InOctets{cust=~"$tenant"}[5m]))[24h:5m]) *8 

I would like to know what’s the difference between deriv and rate functions ? if i am using the right queries ?

Thank you.