Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
picture_loader_benchmark.cpp File Reference
#include "client/settings/cache_settings.h"
#include "interface/card_picture_loader/card_picture_loader_worker.h"
#include "interface/card_picture_loader/card_picture_to_load.h"
#include "libcockatrice/card/card_info.h"
#include "libcockatrice/card/database/card_database_loader.h"
#include <QByteArrayView>
#include <QCoreApplication>
#include <QDir>
#include <QElapsedTimer>
#include <QEventLoop>
#include <QFile>
#include <QFlags>
#include <QImage>
#include <QLatin1String>
#include <QList>
#include <QMessageLogContext>
#include <QMetaType>
#include <QMutex>
#include <QMutexLocker>
#include <QObject>
#include <QSharedPointer>
#include <QString>
#include <QStringList>
#include <QStringLiteral>
#include <QTemporaryDir>
#include <QThread>
#include <QTimer>
#include <QUrl>
#include <QtGlobal>
#include <QtMessageHandler>
#include <atomic>
#include <cstdio>
#include <libcockatrice/card/database/card_database.h>
#include <libcockatrice/card/printing/exact_card.h>
#include <libcockatrice/card/printing/printing_info.h>
#include <libcockatrice/interfaces/interface_card_database_path_provider.h>
#include <libcockatrice/interfaces/noop_card_preference_provider.h>
#include <libcockatrice/interfaces/noop_card_set_priority_controller.h>
#include <libcockatrice/settings/download_settings.h>
#include <optional>
#include <qsystemdetection.h>
#include <utility>
Include dependency graph for picture_loader_benchmark.cpp:

Classes

class  BenchmarkCardDatabasePathProvider
struct  PassResult
struct  StressResult
struct  LogCounters

Functions

static QList< ExactCard > selectCardsForTemplate (CardDatabase &db, const QString &urlTemplate, int maxCards)
static PassResult runPass (CardPictureLoaderWorker *worker, const QList< ExactCard > &cards, int timeoutMs)
static void stressLogHandler (QtMsgType type, const QMessageLogContext &context, const QString &msg)
static void destroyWorker (CardPictureLoaderWorker *worker)
static StressResult runStress (CardPictureLoaderWorker *workerA, CardPictureLoaderWorker *workerB, const QList< ExactCard > &cards, int timeoutMs)
static QString formatDuration (qint64 ms)
static bool likelyRedirects (const QString &urlTemplate)
static QString hostOf (const QString &urlTemplate)
static void printUsage ()
int main (int argc, char **argv)

Variables

static std::atomic< LogCounters * > s_activeCounters {nullptr}
static QtMessageHandler s_previousMessageHandler = nullptr

Function Documentation

◆ destroyWorker()

void destroyWorker ( CardPictureLoaderWorker * worker)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ formatDuration()

QString formatDuration ( qint64 ms)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hostOf()

QString hostOf ( const QString & urlTemplate)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ likelyRedirects()

bool likelyRedirects ( const QString & urlTemplate)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

int main ( int argc,
char ** argv )
Here is the call graph for this function:

◆ printUsage()

void printUsage ( )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ runPass()

PassResult runPass ( CardPictureLoaderWorker * worker,
const QList< ExactCard > & cards,
int timeoutMs )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ runStress()

StressResult runStress ( CardPictureLoaderWorker * workerA,
CardPictureLoaderWorker * workerB,
const QList< ExactCard > & cards,
int timeoutMs )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ selectCardsForTemplate()

QList< ExactCard > selectCardsForTemplate ( CardDatabase & db,
const QString & urlTemplate,
int maxCards )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stressLogHandler()

void stressLogHandler ( QtMsgType type,
const QMessageLogContext & context,
const QString & msg )
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ s_activeCounters

std::atomic<LogCounters *> s_activeCounters {nullptr}
static

◆ s_previousMessageHandler

QtMessageHandler s_previousMessageHandler = nullptr
static