Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
oracle_importer_benchmark_test.cpp File Reference
#include "../../oracle/src/oracleimporter.h"
#include "libcockatrice/card/card_info.h"
#include "libcockatrice/card/set/card_set.h"
#include "gtest/gtest.h"
#include <QBuffer>
#include <QByteArray>
#include <QChar>
#include <QCoreApplication>
#include <QDebug>
#include <QElapsedTimer>
#include <QEventLoop>
#include <QFile>
#include <QIODevice>
#include <QJsonArray>
#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonValue>
#include <QJsonValueRef>
#include <QList>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QNetworkRequest>
#include <QObject>
#include <QSharedPointer>
#include <QString>
#include <QTimer>
#include <QUrl>
#include <QtGlobal>
#include <libcockatrice/interfaces/noop_card_set_priority_controller.h>
#include <qlogging.h>
#include <qsystemdetection.h>
#include <string>
#include <utility>
Include dependency graph for oracle_importer_benchmark_test.cpp:

Classes

struct  MemorySnapshot

Functions

static QByteArray buildSyntheticData (int numSets, int cardsPerSet)
 TEST (OracleBenchmark, ImportThroughput)
 TEST (OracleBenchmark, ParseJsonThroughput)
 TEST (OracleBenchmark, SplitCardMerging)
 TEST (OracleBenchmark, ImportCardsWithColors)
static const QUrl kDefaultAllPrintingsUrl ("https://www.mtgjson.com/api/v5/AllPrintings.json")
static const QByteArray kXzSignature ("\xFD\x37\x7A\x58\x5A", 6)
static const QByteArray kZipSignature ("PK")
static QString formatKb (qint64 kb)
static void logRamPhase (const QString &phase, const MemorySnapshot &baseline, const MemorySnapshot &current)
static QByteArray decompressSetsData (const QByteArray &payload)
 TEST (OracleBenchmark, ImportRamUsage)
 TEST (OracleBenchmark, ImportRamUsageAllPrintings)
int main (int argc, char **argv)

Function Documentation

◆ buildSyntheticData()

QByteArray buildSyntheticData ( int numSets,
int cardsPerSet )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ decompressSetsData()

QByteArray decompressSetsData ( const QByteArray & payload)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ formatKb()

QString formatKb ( qint64 kb)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kDefaultAllPrintingsUrl()

const QUrl kDefaultAllPrintingsUrl ( "https://www.mtgjson.com/api/v5/AllPrintings.json" )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kXzSignature()

const QByteArray kXzSignature ( "\xFD\x37\x7A\x58\x5A" ,
6  )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kZipSignature()

const QByteArray kZipSignature ( "PK" )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ logRamPhase()

void logRamPhase ( const QString & phase,
const MemorySnapshot & baseline,
const MemorySnapshot & current )
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:

◆ TEST() [1/6]

TEST ( OracleBenchmark ,
ImportCardsWithColors  )
Here is the call graph for this function:

◆ TEST() [2/6]

TEST ( OracleBenchmark ,
ImportRamUsage  )
Here is the call graph for this function:

◆ TEST() [3/6]

TEST ( OracleBenchmark ,
ImportRamUsageAllPrintings  )
Here is the call graph for this function:

◆ TEST() [4/6]

TEST ( OracleBenchmark ,
ImportThroughput  )
Here is the call graph for this function:

◆ TEST() [5/6]

TEST ( OracleBenchmark ,
ParseJsonThroughput  )
Here is the call graph for this function:

◆ TEST() [6/6]

TEST ( OracleBenchmark ,
SplitCardMerging  )
Here is the call graph for this function: