aboutsummaryrefslogtreecommitdiffstats
path: root/src/Stats.cxx (unfollow)
Commit message (Collapse)AuthorFilesLines
2014-01-10Stats: lazy initializationMax Kellermann1-7/+34
Ask the DatabasePlugin for stats when the first client requests them, not at startup.
2013-11-24Stats: use monotonic clock instead of GTimerMax Kellermann1-12/+7
Reduce GLib usage.
2013-11-24Stats: use GetProcessTimes() on WIN32 to determine MPD uptimeMax Kellermann1-2/+14
Don't use GTimer if the operating system is able to tell us the uptime.
2013-11-22DatabasePlugin: add method GetUpdateStamp()Max Kellermann1-2/+3
Refactor SimpleDatabase::GetLastModified() to be generic for all plugins. Remove the SimpleDatabase assumption from db_stats_print(), allowing it to be implemented by all database plugins.
2013-11-22Stats: print db statistics only if db is availableMax Kellermann1-6/+19
Fixes crash on "stats" in certain configurations.
2013-11-22Stats: print more unsigned integersMax Kellermann1-6/+6
2013-11-22Stats: auto-reload statistics with proxy pluginMax Kellermann1-0/+7
2013-11-22Stats: use struct DatabaseStatsMax Kellermann1-10/+4
Eliminate redundant declaration.
2013-11-22Stats: move the GTimer variable out of struct statsMax Kellermann1-3/+4
2013-11-22Stats: don't export the global variable "stats"Max Kellermann1-1/+1
Unused outside of Stats.cxx.
2013-11-22Stats: print db_update as unsigned integerMax Kellermann1-2/+2
2013-10-19ClientInternal: move class Client to Client.hxxMax Kellermann1-1/+1
Publish the Client API, preparing to move more code into the Client class.
2013-10-19*: use references instead of pointersMax Kellermann1-2/+2
2013-10-02Stats: don't include glib.h in headerMax Kellermann1-0/+2
Use forward declaration instead.
2013-10-02Stats: rename stats.h to Stats.hxxMax Kellermann1-5/+1
2013-10-02Log: new logging library APIMax Kellermann1-1/+2
Prepare to migrate away from GLib. Currently, we're still using GLib as a backend.
2013-09-04util/Error: new error passing libraryMax Kellermann1-4/+4
Replaces GLib's GError.
2013-01-20PlayerControl: move functions into the classMax Kellermann1-1/+1
2013-01-04player_control.h: convert header to C++Max Kellermann1-1/+1
2013-01-03Client: rename the struct client to class ClientMax Kellermann1-1/+1
2013-01-03client: convert to C++Max Kellermann1-3/+2
2013-01-03database.h: rename to DatabaseSimple.hxxMax Kellermann1-1/+1
2012-08-29Stats: stats_print() returns voidMax Kellermann1-3/+2
2012-08-15DatabasePlugin: add method GetStats()Max Kellermann1-63/+18
Optimize the ProxyDatabase by invoking "stats" on the peer, instead of visiting all songs.
2012-08-08DatabaseGlue: add function db_is_simple()Max Kellermann1-4/+8
Preparing for non-"simple" database plugins.
2012-08-07db_selection: rename to DatabaseSelectionMax Kellermann1-3/+2
2012-08-07Database{Plugin,Visitor}: pass referencesMax Kellermann1-4/+4
2012-08-02stats: convert to C++Max Kellermann1-26/+31
2011-11-27stats: explicitly cast "time_t" to "long"Max Kellermann1-1/+1
Fixes warning on mingw32.
2011-09-13database: don't allow uri==NULLMax Kellermann1-1/+1
Add nonnull attributes and fix all callers.
2011-09-13database: add struct db_visitorMax Kellermann1-4/+10
Use this struct for db_walk().
2011-01-29copyright year 2011Max Kellermann1-1/+1
2011-01-10player_control: removed the global variable "pc"Max Kellermann1-1/+2
Allocate a player_control object where needed, and pass it around. Each "client" object is associated with a "player_control" instance. This prepares multi-player support.
2009-12-31Update copyright notices.Avuton Olrich1-1/+1
2009-11-12include config.h in all sourcesMax Kellermann1-0/+1
After we've been hit by Large File Support problems several times in the past week (which only occur on 32 bit platforms, which I don't have), this is yet another attempt to fix the issue.
2009-10-13tag: removed the "_ITEM_" suffix from the enum namesMax Kellermann1-2/+2
2009-10-08player_control: no CamelCaseMax Kellermann1-1/+1
2009-03-13all: Update copyright header.Avuton Olrich1-7/+7
This updates the copyright header to all be the same, which is pretty much an update of where to mail request for a copy of the GPL and the years of the MPD project. This also puts all committers under 'The Music Player Project' umbrella. These entries should go individually in the AUTHORS file, for consistancy.
2009-02-27tag: no CamelCaseMax Kellermann1-1/+1
Renamed numOfItems to num_items.
2009-01-18stats: use GTimer instead of time(NULL)Max Kellermann1-2/+7
time(NULL) shows the wrong results when the machine's clock is changed.
2009-01-18stats: use one db_walk() to obtain statsMax Kellermann1-30/+44
Don't use dbUtils.h functions. This reduces 4 full database walks to just one.
2009-01-18stats: added num_artists, num_albumsMax Kellermann1-8/+10
Don't recalculate the number of artists and albums each time a client requests statistics. Calculate that once in stats_update().
2009-01-18stats: no CamelCaseMax Kellermann1-11/+11
Renamed functions and types.
2009-01-04stats: added stats_update()Max Kellermann1-0/+7
2008-12-29removed os_compat.hMax Kellermann1-2/+0
Only include headers which are really needed. os_compat.h aimed to make MPD easily portable, but was never actually made portable.
2008-10-08database: renamed functions, "db_" prefix and no CamelCaseMax Kellermann1-2/+2
Yet another CamelCase removal patch.
2008-10-08directory: moved code to database.cMax Kellermann1-1/+1
Taming the directory.c monster, part II: move the database management stuff to database. directory.c should only contain code which works on directory objects.
2008-10-08song: converted typedef Song to struct songMax Kellermann1-1/+3
Again, a data type which can be forward-declared.
2008-09-08use strset.h instead of tagTracker.hMax Kellermann1-3/+41
With a large music database, the linear string collection in tagTracker.c becomes very slow. We implemented that in a quick'n'dirty fashion when we removed tree.c, and now we rewrite it using the fast hashed string set.
2008-09-07stats: don't pass "fd" to printStats()Max Kellermann1-10/+17
Pass the client struct instead of the raw file descriptor.