"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tools/src/qspng.c" between
mod_qos-11.67.tar.gz and mod_qos-11.68.tar.gz

About: mod_qos is a quality of service module for the Apache web server implementing control mechanisms that can provide different priority to different HTTP requests (for e.g. to protect the server resources and to mitigate DOS attacks).

qspng.c  (mod_qos-11.67):qspng.c  (mod_qos-11.68)
skipping to change at line 28 skipping to change at line 28
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
* *
*/ */
static const char revision[] = "$Id: qspng.c 2615 2021-02-18 20:55:16Z pbuchbind er $"; static const char revision[] = "$Id: qspng.c 2622 2021-08-08 20:54:09Z pbuchbind er $";
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <png.h> #include <png.h>
//#include <config.h> //#include <config.h>
skipping to change at line 79 skipping to change at line 79
{ "50-99ms", "requests duration 50-99ms", 45, 100, 180 }, { "50-99ms", "requests duration 50-99ms", 45, 100, 180 },
{ "100-499ms", "requests duration 100-499ms", 45, 100, 180 }, { "100-499ms", "requests duration 100-499ms", 45, 100, 180 },
{ "500-999ms", "requests duration 500-999ms", 45, 100, 180 }, { "500-999ms", "requests duration 500-999ms", 45, 100, 180 },
{ "<1s", "requests faster than 1 second", 35, 95, 180 }, { "<1s", "requests faster than 1 second", 35, 95, 180 },
{ "1s", "requests faster or equal than 1 second", 35, 90, 180 }, { "1s", "requests faster or equal than 1 second", 35, 90, 180 },
{ "2s", "requests with 2 seconds response time", 30, 85, 180 }, { "2s", "requests with 2 seconds response time", 30, 85, 180 },
{ "3s", "requests with 3 seconds response time", 25, 90, 180 }, { "3s", "requests with 3 seconds response time", 25, 90, 180 },
{ "4s", "requests with 4 seconds response time", 25, 95, 180 }, { "4s", "requests with 4 seconds response time", 25, 95, 180 },
{ "5s", "requests with 5 seconds response time", 15, 90, 180 }, { "5s", "requests with 5 seconds response time", 15, 90, 180 },
{ ">5s","requests slower than 5 seconds", 35, 90, 185 }, { ">5s","requests slower than 5 seconds", 35, 90, 185 },
{ "1xx","requets with HTTP status 1xx", 50, 70, 150 }, { "1xx","requests with HTTP status 1xx", 50, 70, 150 },
{ "2xx","requets with HTTP status 2xx", 50, 70, 150 }, { "2xx","requests with HTTP status 2xx", 50, 70, 150 },
{ "3xx","requets with HTTP status 3xx", 50, 70, 150 }, { "3xx","requests with HTTP status 3xx", 50, 70, 150 },
{ "4xx","requets with HTTP status 4xx", 50, 70, 150 }, { "4xx","requests with HTTP status 4xx", 50, 70, 150 },
{ "5xx","requets with HTTP status 5xx", 50, 70, 150 }, { "5xx","requests with HTTP status 5xx", 50, 70, 150 },
{ "ip", "IP addresses", 55, 60, 150 }, { "ip", "IP addresses", 55, 60, 150 },
{ "usr","active users", 55, 66, 150 }, { "usr","active users", 55, 66, 150 },
{ "qV", "created VIP sessions", 55, 50, 155 }, { "qV", "created VIP sessions", 55, 50, 155 },
{ "qS", "session pass", 55, 75, 160 }, { "qS", "session pass", 55, 75, 160 },
{ "qD", "access denied", 55, 70, 170 }, { "qD", "access denied", 55, 70, 170 },
{ "qK", "connection closed", 55, 60, 145 }, { "qK", "connection closed", 55, 60, 145 },
{ "qT", "dynamic keep-alive", 55, 55, 153 }, { "qT", "dynamic keep-alive", 55, 55, 153 },
{ "qL", "slow down", 55, 65, 140 }, { "qL", "slow down", 55, 65, 140 },
{ "qA", "connection aborts", 55, 50, 175 }, { "qA", "connection aborts", 55, 50, 175 },
{ "qs", "serialization", 55, 40, 175 }, { "qs", "serialization", 55, 40, 175 },
skipping to change at line 431 skipping to change at line 431
long tmp[X_SAMPLE_RATE]; // used to build average over multiple samples long tmp[X_SAMPLE_RATE]; // used to build average over multiple samples
int sample = 1; // sample rate counter (1 to X_SAMPLE_RATE) int sample = 1; // sample rate counter (1 to X_SAMPLE_RATE)
int i = 0; int i = 0;
char line[HUGE_STRING_LEN]; char line[HUGE_STRING_LEN];
long peak = 0; // max of all values long peak = 0; // max of all values
double scale = 1; // scaling factor (height x scale = unit) double scale = 1; // scaling factor (height x scale = unit)
int hour = -1; // detect "new" hour int hour = -1; // detect "new" hour
char date_str[32] = ""; // sting storing the first day (if fist value is at 0 0h) char date_str[32] = ""; // string storing the first day (if fist value is at 00h)
long ret; long ret;
for(x=0; x<width; x++) hours[x] = 0; for(x=0; x<width; x++) hours[x] = 0;
/* reads the file and resample measure points to width of the graph */ /* reads the file and resample measure points to width of the graph */
while(!qs_png_getline(line, sizeof(line), stat_log) && i < width) { while(!qs_png_getline(line, sizeof(line), stat_log) && i < width) {
char *p = strstr(line, name); char *p = strstr(line, name);
req[i] = 0; req[i] = 0;
max_req[i] = 0; max_req[i] = 0;
if(p && ((p - line) > 8)) { if(p && ((p - line) > 8)) {
char *e; char *e;
 End of changes. 3 change blocks. 
7 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)