https://habr.com/ru/post/358950/
Тестируют один юнит функциональности.
Не должны ходить в базу или внешние сервисы.
;; dataset size: 10 users, 200 clients, 30k invoices | |
(time | |
(let [client-ids | |
(->> | |
(xt/q (db) | |
'{:find [?client] | |
:where [[(lucene-text-search | |
"client\\/first-name: %1$s* OR client\\/last-name: %1$s* OR client\\/company-name: %1$s*" | |
?s-str) |
-- Check "JSONB storage does not deduplicate the key names in the JSON. This can result in considerably larger storage footprint.. " from https://scalegrid.io/blog/using-jsonb-in-postgresql-how-to-effectively-store-index-json-data-in-postgresql/ | |
create table jt_1 (a integer, b numeric, c text); | |
create table jt_2 (data jsonb); | |
create table jt_3 (data jsonb); | |
create table jt_4 (data jsonb); | |
-- 10 million records for jt_1 and jt_2 | |
insert into jt_1 SELECT (random() * 100000)::integer, | |
(random() * 1000000)::numeric, |
https://habr.com/ru/post/358950/
Тестируют один юнит функциональности.
Не должны ходить в базу или внешние сервисы.
package main | |
import ( | |
"testing" | |
"github.com/stretchr/testify/require" | |
) | |
type eee struct{} |
- hosts: localhost | |
connection: local | |
gather_facts: false | |
tasks: | |
- name: add a couple of keys to an authorized_keys file | |
authorized_key: path='./keys' user=sgargan key="{{ lookup('file', './ansible.pub') }}" | |
- authorized_key: path='./keys' user=sgargan key="{{ lookup('file', './sgargan.pub') }}" |
/* | |
go test str_conc_test.go -bench . -benchtime 10s | |
BenchmarkConcatOne-4 2000000 7684 ns/op | |
BenchmarkConcatTwo-4 5000000 2883 ns/op | |
BenchmarkConcatThree-4 5000000 2933 ns/op | |
PASS | |
ok command-line-arguments 56.982s | |
*/ | |
package main |
-*- mode: grep; default-directory: "/usr/local/go/src/" -*- | |
Grep started at Mon Apr 3 17:48:57 | |
find . -type d \( -path \*/SCCS -o -path \*/RCS -o -path \*/CVS -o -path \*/MCVS -o -path \*/.svn -o -path \*/.git -o -path \*/.hg -o -path \*/.bzr -o -path \*/_MTN -o -path \*/_darcs -o -path \*/\{arch\} \) -prune -o \! -type d \( -name .\#\* -o -name \*.o -o -name \*\~ -o -name \*.bin -o -name \*.lbin -o -name \*.so -o -name \*.a -o -name \*.ln -o -name \*.blg -o -name \*.bbl -o -name \*.elc -o -name \*.lof -o -name \*.glo -o -name \*.idx -o -name \*.lot -o -name \*.fmt -o -name \*.tfm -o -name \*.class -o -name \*.fas -o -name \*.lib -o -name \*.mem -o -name \*.x86f -o -name \*.sparcf -o -name \*.dfsl -o -name \*.pfsl -o -name \*.d64fsl -o -name \*.p64fsl -o -name \*.lx64fsl -o -name \*.lx32fsl -o -name \*.dx64fsl -o -name \*.dx32fsl -o -name \*.fx64fsl -o -name \*.fx32fsl -o -name \*.sx64fsl -o -name \*.sx32fsl -o -name \*.wx64fsl -o -name \*.wx32fsl -o -name \*.fasl -o -name \*.ufsl -o -name \*.fsl -o -name \ |
sudo usermod -aG docker $USER
https://docs.docker.com/compose/install/
<?php | |
if (!function_exists('array_replace_recursive_overwrite')) { | |
function array_replace_recursive_overwrite($array, $array1) | |
{ | |
$recurse = function ($array,$array1) use (&$recurse) | |
{ | |
foreach ($array1 as $key => $value) { |
Dockerfile
that is based on your production image and
simply install xdebug
into it. Exemple:FROM php:5
RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \