This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
if (count($argv) < 5) die("Usage: ".__FILE__." <batch size> <concurrency> <docs> <multiplier>\n"); | |
/* | |
Requires: | |
wget https://raw.githubusercontent.com/zeraye/names-surnames-list/master/male-names-list.txt > names.txt | |
wget https://raw.githubusercontent.com/zeraye/names-surnames-list/master/female-names-list.txt >> names.txt | |
wget https://raw.githubusercontent.com/zeraye/names-surnames-list/master/surnames-list.txt > surnames.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
if (count($argv) < 6) die("Usage: ".__FILE__." <batch size> <concurrency> <docs> <shards> <multiplier>\n"); | |
require_once 'vendor/autoload.php'; | |
$t = microtime(true); | |
$c = 0; | |
$ch = curl_init(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
if (count($argv) < 5) die("Usage: ".__FILE__." <batch size> <concurrency> <docs> <multiplier>\n"); | |
require_once 'vendor/autoload.php'; | |
$t = microtime(true); | |
$c = 0; | |
# delete old index |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MySQL: | |
mysql> desc data; | |
+---------+------------+------+-----+-------------------+-----------------------------+ | |
| Field | Type | Null | Key | Default | Extra | | |
+---------+------------+------+-----+-------------------+-----------------------------+ | |
| id | bigint(20) | NO | PRI | 0 | | | |
| body | text | YES | | NULL | | | |
| updated | timestamp | NO | | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP | | |
+---------+------------+------+-----+-------------------+-----------------------------+ | |
3 rows in set (0.00 sec) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
d="/tmp/manticore_replication_sandbox_docker_compose.yaml"; | |
cat << EOF > $d | |
version: '2.2' | |
services: | |
manticore-1: | |
image: manticoresearch/manticore | |
networks: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ ~ docker run --name manticore -p9306:9306 -p9308:9308 --rm -d manticoresearch/manticore && \ | |
docker exec -it manticore mysql && \ | |
docker stop manticore | |
MySQL [(none)]> create table t2(f text); | |
MySQL [(none)]> insert into t2 values(0,'6406 Pz.Kpfw.VI Ausf.E Tiger I Late Production'),(0,'6800 Танк Wittmann\'sLast Tiger'); | |
MySQL [(none)]> select * from t2; | |
+---------------------+------------------------------------------------+ | |
| id | f | | |
+---------------------+------------------------------------------------+ |