Add arraytest3 to test on macro rather than two
All checks were successful
Deploy datapack to dev / Build (push) Successful in 8s
All checks were successful
Deploy datapack to dev / Build (push) Successful in 8s
This commit is contained in:
parent
1474266e89
commit
3c0eab8fd8
@ -99,4 +99,37 @@ class database.benchmark {
|
|||||||
::temp.index.del();
|
::temp.index.del();
|
||||||
::temp.result.del();
|
::temp.result.del();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function arrayTest3.setup() {
|
||||||
|
::database.test.arrayTest3.array = [];
|
||||||
|
::database.test.arrayTest3.index = {};
|
||||||
|
Hardcode.repeat(
|
||||||
|
indexString="[index]",
|
||||||
|
start=0,
|
||||||
|
stop=500,
|
||||||
|
function=() => {
|
||||||
|
::database.test.arrayTest3.array << {id: Hardcode.calc([index]+1), string: "entryHardcode.calc([index]+1)"};
|
||||||
|
::database.test.arrayTest3.index += {entryHardcode.calc([index]+1): [index]};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
function arrayTest3.printArray() {
|
||||||
|
tellraw @a {"nbt":"database.test.arrayTest3.array","storage":"ferdinland:ferdinland"};
|
||||||
|
}
|
||||||
|
function arrayTest3.printIndex() {
|
||||||
|
tellraw @a {"nbt":"database.test.arrayTest3.index","storage":"ferdinland:ferdinland"};
|
||||||
|
}
|
||||||
|
function arrayTest3.clean() {
|
||||||
|
::database.test.arrayTest3.array.del();
|
||||||
|
::database.test.arrayTest3.index.del();
|
||||||
|
}
|
||||||
|
function arrayTest3._searchArray() {
|
||||||
|
$::temp.result = ::database.test.arrayTest3.array[string:$(keyword)];
|
||||||
|
}
|
||||||
|
function arrayTest3.run() {
|
||||||
|
::temp.keyword = "entry500";
|
||||||
|
this.arrayTest3._searchArray() with ::temp;
|
||||||
|
::temp.keyword.del();
|
||||||
|
::temp.result.del();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user