| 41 | } |
| 42 | |
| 43 | static inline bool |
| 44 | cdbexplain_agg_upd(CdbExplain_Agg *agg, double v, int id) |
| 45 | { |
| 46 | if (v > 0) |
| 47 | { |
| 48 | agg->vsum += v; |
| 49 | agg->vcnt++; |
| 50 | |
| 51 | if (v > agg->vmax || |
| 52 | agg->vcnt == 1) |
| 53 | { |
| 54 | agg->vmax = v; |
| 55 | agg->imax = id; |
| 56 | return true; |
| 57 | } |
| 58 | } |
| 59 | return false; |
| 60 | } |
| 61 | |
| 62 | static inline double |
| 63 | cdbexplain_agg_avg(CdbExplain_Agg *agg) |
no outgoing calls
no test coverage detected