aboutsummaryrefslogtreecommitdiffstats
path: root/src/Stats.cxx (unfollow)
Commit message (Collapse)AuthorFilesLines
2014-02-04Instance: add Database attributeMax Kellermann1-4/+3
Move from db/DatabaseGlue.cxx, eliminating global variable.
2014-02-01Stats: pass Database reference aroundMax Kellermann1-9/+8
Call GetDatabase() only once.
2014-02-01Stats: remove obsolete "simple" plugin special caseMax Kellermann1-8/+0
The proxy plugin has now implemented the "idle" event listener.
2014-02-01Stats: return false if update has failedMax Kellermann1-1/+1
2014-01-30db: add compile-time option to disable databaseMax Kellermann1-0/+10
2014-01-24Database*: move to db/Max Kellermann1-4/+4
2014-01-24Client*: move to client/Max Kellermann1-1/+1
2014-01-13copyright year 2014Max Kellermann1-1/+1
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().