2026-08-28 08:28:39 -05:00 | | | //+------------------------------------------------------------------+
|
| | | //| Def.mqh |
|
| | | //| Copyright 2026, Niquel Mendoza |
|
| | | //| https://www.mql5.com |
|
| | | //+------------------------------------------------------------------+
|
| | | #property copyright "Copyright 2026, Niquel Mendoza"
|
| | | #property link "https://www.mql5.com"
|
| | | #property strict
|
| | |
|
| | | #ifndef JSONPARSERBYLEO_TEST_BEN_DEF_MQH
|
| | | #define JSONPARSERBYLEO_TEST_BEN_DEF_MQH
|
| | |
|
| | | //+------------------------------------------------------------------+
|
| | | //| |
|
| | | //+------------------------------------------------------------------+
|
| | | #include <TSN\\MQLArticles\\Utils\\MBen.mqh>
|
| | | #include "..\\..\\..\\Xoshiro256\\Xoshiro256.mqh"
|
| | |
|
| | | //+------------------------------------------------------------------+
|
| | | //| |
|
| | | //+------------------------------------------------------------------+
|
| | | //#define JSONASM_VER
|
2026-08-28 08:36:08 -05:00 | | |
|
| | | //---
|
| | | #ifndef JSONBENCH_RUN_PARSE
|
| | | #resource "test.json" as const string g_json_test_access;
|
| | | #else // JSONBENCH_RUN_PARSE
|
| | | // Si cocremos el parsing
|
2026-08-28 08:28:39 -05:00 | | | #ifndef JSONASM_VER
|
| | | #resource "twitter.json" as const string g_json_data;
|
2026-08-28 08:36:08 -05:00 | | | #else // JSONASM_VER
|
2026-08-28 11:16:09 -05:00 | | | #resource "twitter.jsonasm" as const string g_json_data;
|
2026-08-28 08:28:39 -05:00 | | | #endif // JSONASM_VER
|
| | |
|
2026-08-28 08:36:08 -05:00 | | | #endif // JSONBENCH_RUN_PARSE
|
2026-08-28 08:28:39 -05:00 | | |
|
| | | //+------------------------------------------------------------------+
|
| | | //| Generales |
|
| | | //+------------------------------------------------------------------+
|
| | | //---
|
| | | #define JSONBENCH_DB_NAME ("JsonBenchMql\\data.db")
|
| | | #define JSONBENCH_PREFIX ("JsonBenchMql")
|
| | |
|
| | |
|
| | | //+------------------------------------------------------------------+
|
| | | //| Parseo |
|
| | | //+------------------------------------------------------------------+
|
| | | //---
|
| | | #define JSONBENCH_TAGOP_PARSE "parse"
|
| | | #define JSONBENCH_TAGDATASET_PARSE "twitter.json"
|
| | | #define JSONBENCH_TOTAL_ITER_PARSE (1000)
|
| | |
|
| | | //+------------------------------------------------------------------+
|
| | | //| Acceso |
|
| | | //+------------------------------------------------------------------+
|
| | | // acceso
|
| | | #define JSONBENCH_TAGOP_ACCESO_WIDE "acceso-wide"
|
| | | #define JSONBENCH_TAGOP_ACCESO_DEEP "acceso-deep"
|
| | | #define JSONBENCH_TAGOP_ACCESO_LARGE_ARR "acceso-array-large"
|
| | | #define JSONBENCH_TAGOP_ACCESO_MIX "acceso-mixed-trading"
|
| | | #define JSONBENCH_ACCESO_XHOR_SEED (777)
|
| | | #define JSONBENCH_TAGDATASET_ACCES "test.json"
|
| | | #define JSONBENCH_TOTAL_ITER_ACCESO (1000)
|
| | |
|
| | |
|
| | | //+------------------------------------------------------------------+
|
| | | //| Macros |
|
| | | //+------------------------------------------------------------------+
|
| | | //--- basicos
|
2026-08-28 09:42:51 -05:00 | | | #define JSONBENCH_FINISH TSN::CMultiBenchmark::Finish(JSONBENCH_DB_NAME, TimeToString(TimeLocal(),TIME_DATE), LIBNAME);
|
2026-08-28 08:28:39 -05:00 | | |
|
| | |
|
| | | //--- funcion easy para acceso
|
| | | #define JSONBENCH_ACCES_CALL(TAG) \
|
| | | Print("[",TAG,"] Time: ", (b-a));\
|
| | | TSN::CMultiBenchmark::Add(TAG,JSONBENCH_TAGDATASET_ACCES,JSONBENCH_TOTAL_ITER_ACCESO, (b-a));
|
| | |
|
| | |
|
| | |
|
| | | #endif // JSONPARSERBYLEO_TEST_BEN_DEF_MQH
|