mod_tile 0.9.1
Renders map tiles with Mapnik and serves them using Apache HTTP Server
Loading...
Searching...
No Matches
render_speedtest.cpp File Reference
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <getopt.h>
#include <glib.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <unistd.h>
#include "config.h"
#include "g_logger.h"
#include "protocol.h"
#include "render_config.h"
#include "render_submit_queue.h"
#include "renderd_config.h"

Classes

class  GoogleProjection
 Web Mercator (EPSG:3857 / Slippy Map) coordinate converter between WGS84 lat/lon and zoom-level pixels. More...

Macros

#define DEG_TO_RAD   (M_PI / 180)
 Conversion factor from degrees to radians ( \(\pi / 180\)).
#define RAD_TO_DEG   (180 / M_PI)
 Conversion factor from radians to degrees ( \(180 / \pi\)).

Functions

static double minmax (double a, double b, double c)
 Clamp a double-precision value a to the closed interval [b, c].
int main (int argc, char **argv)
 Entry point for the render_speedtest rendering throughput benchmark utility.

Variables

static double boundx0 = -0.5
 Western longitude bound (degrees) of the Greater London benchmark bounding box.
static double boundy0 = 51.25
 Southern latitude bound (degrees) of the Greater London benchmark bounding box.
static double boundx1 = 0.5
 Eastern longitude bound (degrees) of the Greater London benchmark bounding box.
static double boundy1 = 51.75
 Northern latitude bound (degrees) of the Greater London benchmark bounding box.

Macro Definition Documentation

◆ DEG_TO_RAD

#define DEG_TO_RAD   (M_PI / 180)

Conversion factor from degrees to radians ( \(\pi / 180\)).

◆ RAD_TO_DEG

#define RAD_TO_DEG   (180 / M_PI)

Conversion factor from radians to degrees ( \(180 / \pi\)).

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

Entry point for the render_speedtest rendering throughput benchmark utility.

Parses command-line options (-c/--config, -m/--map, -Z/--max-zoom, -z/--min-zoom, -n/--num-threads, -s/--socket, -h/--help, -V/--version), optionally loads defaults from a renderd INI config file, warms up renderd with tile 0/0/0, and enqueues all tiles within [boundx0, boundy0, boundx1, boundy1] across min_zoom..max_zoom while measuring and logging per-zoom and aggregate rendering throughput.

Parameters
argcCommand-line argument count.
argvCommand-line argument vector.
Returns
0 on completion, or 1 on invalid CLI arguments or missing config/map.

◆ minmax()

double minmax ( double a,
double b,
double c )
static

Clamp a double-precision value a to the closed interval [b, c].

Parameters
aInput value to clamp.
bLower bound.
cUpper bound.
Returns
a clamped between b and c.

Variable Documentation

◆ boundx0

double boundx0 = -0.5
static

Western longitude bound (degrees) of the Greater London benchmark bounding box.

◆ boundx1

double boundx1 = 0.5
static

Eastern longitude bound (degrees) of the Greater London benchmark bounding box.

◆ boundy0

double boundy0 = 51.25
static

Southern latitude bound (degrees) of the Greater London benchmark bounding box.

◆ boundy1

double boundy1 = 51.75
static

Northern latitude bound (degrees) of the Greater London benchmark bounding box.