Compare commits
5 Commits
a830c894ac
...
7be40debe7
| Author | SHA1 | Date | |
|---|---|---|---|
| 7be40debe7 | |||
| a4e515ed80 | |||
| e5ce1e7734 | |||
| 7a69996c55 | |||
| 237259d509 |
3
main.jmc
3
main.jmc
@ -1,5 +1,6 @@
|
||||
import "src/logger.jmc";
|
||||
import "src/database.jmc";
|
||||
import "src/database/crypt.jmc";
|
||||
import "src/database/database.jmc";
|
||||
import "src/commands.jmc";
|
||||
|
||||
function __tick__() {}
|
||||
|
||||
17
src/database/crypt.jmc
Normal file
17
src/database/crypt.jmc
Normal file
@ -0,0 +1,17 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
@ -22,3 +22,27 @@ class database {
|
||||
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() {
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user