• Stars
    star
    170
  • Rank 222,703 (Top 5 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 12 years ago
  • Updated about 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A frontend for MongoDB's query profiler collection.

mongoqp

mongoqp is a frontend for MongoDB's query profiler collections (i.e. db.system.profile), built using Silex and MongoDB PHP Library.

It currently supports:

  • Toggling query profiler levels (off, slow, all) per database
  • Grouping similar queries by BSON structure
  • Reporting aggregate query statistics (min, max, average, times)
  • Sorting, pagination and filtering via DataTables

Future plans:

  • Control over slow query thresholds
  • Improving analytics
  • Persistent data collection

Screenshots

Server view

Database view

Setup

Installation

Dependencies are managed with Composer, a PHP package manager. This project is also published as a package, which means it can be installed with:

$ composer create-project jmikola/mongoqp

Configuration

The src/ directory includes a config.php.dist file, which may be copied to config.php and customized. If config.php is not present, the default configuration will be included.

Currently, the following options are available:

  • debug: Enable verbose error reporting
  • mongodb.client.uri: MongoDB connection URI string
  • mongodb.client.uriOptions: MongoDB connection URI options
  • mongodb.client.driverOptions: MongoDB driver options
  • twig.cache_dir: Cache directory for Twig templates

Database Connection

By default, the application will connect to a standalone MongoDB server on the local host (i.e. new MongoDB\Client). The connection may be customized via the mongodb.client options, like so:

$app['mongodb.client.uri'] = 'mongodb://example.com:27017';

The above example connects to a standalone server by its hostname. Consult the MongoDB PHP library documentation for additional examples on connecting to a replica set or specifying auth credentials.

Database profiling cannot be enabled on mongos instances. If you are profiling queries in a sharded cluster, the application should be configured to connect to an individual shard.

Cache Directory

By default, the application will use mongoqp-cache/ within the system's temporary directory. This path, which must be writable, may be customized via the twig.cache_dir configuration option.

Web Server

The application can be started using:

$ php -S localhost:8080 -t web

Instructions for other web server configurations are outlined in the Silex documentation.

More Repositories

1

geojson

GeoJSON implementation for PHP
PHP
282
star
2

AutoLogin

Faciliates automatic login via a single token for Symfony's Security component.
PHP
100
star
3

JmikolaAutoLoginBundle

Authenticate users in your Symfony app via a single query parameter (e.g. email and newsletter links).
PHP
83
star
4

JmikolaWildcardEventDispatcherBundle

Enhances the Symfony event dispatcher with support for wildcard patterns inspired by AMQP topic exchanges.
PHP
35
star
5

WildcardEventDispatcher

Event dispatcher with support for wildcard patterns inspired by AMQP topic exchanges.
PHP
33
star
6

react-mongodb

Asynchronous MongoDB client for React PHP
PHP
25
star
7

JmikolaJsAssetsHelperBundle

Exposes the AssetsHelper service from Symfony2's templating component to JavaScript, allowing relative or absolute asset URI's to be generated client-side.
JavaScript
19
star
8

fb-events-widget

An embeddable widget for listing Facebook events.
PHP
16
star
9

slides

Slide decks and presentations
HTML
14
star
10

JmikolaInsecureRoutesBundle

Removes HTTPS scheme requirements from routes in your Symfony2 app (for dev/test environments).
PHP
13
star
11

JmikolaImagineBundle

Extra filters/loaders to complement AvalancheImagineBundle
PHP
9
star
12

SimpleCASBundle

SimpleCAS integration for authenticating users in Symfony2
PHP
8
star
13

silex-mongodb-workshop

PHP
8
star
14

hhamon-flying

Where in the world is @hhamon?
PHP
6
star
15

mongodb-fuse

A FUSE wrapper for MongoDB (not GridFS)
6
star
16

silex-mongodb-aggregation-demo

MongoDB aggregation demo using Silex
JavaScript
5
star
17

mongo-php-fluent

Fluent query API prototype for mongo-php-driver
PHP
3
star
18

Thundergrid

A PHP GridFS Framework (MongoDB)
PHP
3
star
19

li3-mongodb-aggregation-demo

MongoDB aggregation demo using Lithium
PHP
2
star
20

jmikola.github.io

Personal website
HTML
2
star
21

top-shelf-php

Top Shelf PHP Example Application
PHP
2
star
22

github-logout

Viewing this repository may log you out of GitHub.
2
star
23

wurstcon.com

HTML
2
star
24

ZipIterator

A reimplementation of Python's zip() function in PHP
PHP
2
star
25

jmikola.github.io_tmp

PHP
1
star