Compare commits
No commits in common. "7be40debe7ac78dc5650dbf5323965c9eeff119a" and "a830c894acbe8a97f7d2d87b473c9ad9dc006e13" have entirely different histories.
7be40debe7
...
a830c894ac
3
main.jmc
3
main.jmc
@ -1,6 +1,5 @@
|
|||||||
import "src/logger.jmc";
|
import "src/logger.jmc";
|
||||||
import "src/database/crypt.jmc";
|
import "src/database.jmc";
|
||||||
import "src/database/database.jmc";
|
|
||||||
import "src/commands.jmc";
|
import "src/commands.jmc";
|
||||||
|
|
||||||
function __tick__() {}
|
function __tick__() {}
|
||||||
|
|||||||
@ -22,27 +22,3 @@ class database {
|
|||||||
createTable(myTable);
|
createTable(myTable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class database.benchmark {
|
|
||||||
function arrayTest1.setup() {
|
|
||||||
::database.test.arrayTest1.array = [];
|
|
||||||
for ($i=0;$i<=500;$i++) {
|
|
||||||
::database.test.arrayTest1.array << "array item &<$i>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function arrayTest1.clean() {
|
|
||||||
::database.test.arrayTest1.array.del();
|
|
||||||
}
|
|
||||||
function arrayTest1.run() {
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function arrayTest2.setup() {
|
|
||||||
::database.test.arrayTest2.arrays = [];
|
|
||||||
::database.test.arrayTest2.index = [];
|
|
||||||
}
|
|
||||||
function arrayTest2.clean() {
|
|
||||||
}
|
|
||||||
function arrayTest2.run() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
class database.crypt {
|
|
||||||
function hashString() {}
|
|
||||||
|
|
||||||
function hashInteger() {
|
|
||||||
$cryptMultiplyer = 49;
|
|
||||||
$cryptConstant = 7;
|
|
||||||
$cryptPrime = 15331;
|
|
||||||
|
|
||||||
$$input = $(integer);
|
|
||||||
$hash = $input;
|
|
||||||
$hash *= $cryptMultiplyer;
|
|
||||||
$hash += $cryptConstant;
|
|
||||||
$hash %= $cryptPrime;
|
|
||||||
|
|
||||||
tellraw @a $hash.toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user