Révision b32ff11c
Avoid negative queries count on Sphinx restart
Difference calculation can go negative when Sphinx is restarted. This makes ugly spikes in the graph.
| plugins/sphinx/sphinx_queries | ||
|---|---|---|
| 54 | 54 |
fclose($fp); |
| 55 | 55 |
|
| 56 | 56 |
$toShow = (int) ($iCurrent - (int) $iOldCount); |
| 57 |
if ($toShow < 0) {
|
|
| 58 |
$toShow = 0; |
|
| 59 |
} |
|
| 57 | 60 |
} |
| 58 | 61 |
|
| 59 | 62 |
echo "current.value $toShow\n"; |
Formats disponibles : Unified diff