Mock type | Tests duration |
---|---|
Native mocks | 160.10 seconds |
Mockery | 177.01 seconds (+10%) |
PHPUnit mocks | 232.29 seconds (+45%) |
Prophecy | 3868.80 seconds (+2416%) |
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
Taken from packagist.org | |
Packages with a master branch update since June 1st 2018: 98977 | |
Of those, package having requires on PHP extensions: 11676 (11.79%) | |
As only ~12% of packages declare their extension requirements, | |
and even then it might not be a complete list, take all this with | |
a big grain of salt, it is informative but definitely not a | |
complete picture of the most used extensions. |
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
<?php | |
use Symfony\Component\Debug\BufferingLogger; | |
use Symfony\Component\Debug\Debug; | |
use Symfony\Component\Debug\ErrorHandler; | |
$loader = require_once __DIR__ . '/vendor/autoload.php'; | |
class ConfigurableErrorHandler extends ErrorHandler | |
{ |
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
Parsing benchmark duration (ms) | Text (ideal syntax parsing heuristics) | Text (full parsing) | Pure syntax parsing | Binary | Binary vs ideal syntax parsing heuristics | Binary vs full parsing | Binary vs pure syntax parsing | |
---|---|---|---|---|---|---|---|---|
frameworks/angular.1.6.5 | 1106 | 1061 | 1240 | 671 | 0.61 | 0.63 | 0.54 | |
frameworks/backbone.1.3.3 | 135 | 138 | 105 | 76 | 0.56 | 0.55 | 0.72 | |
frameworks/bootstrap.4.1.0 | 242 | 242 | 198 | 150 | 0.62 | 0.62 | 0.76 | |
frameworks/chart.2.7.2 | 844 | 852 | 703 | 533 | 0.63 | 0.63 | 0.76 | |
frameworks/ember.2.18.2 | 2583 | 2392 | 2155 | 1673 | 0.65 | 0.70 | 0.78 | |
frameworks/foundation.6.4.3 | 659 | 652 | 544 | 427 | 0.65 | 0.65 | 0.78 | |
frameworks/jquery.3.3.1 | 644 | 521 | 415 | 322 | 0.50 | 0.62 | 0.78 | |
frameworks/moment.2.22.1 | 283 | 292 | 233 | 184 | 0.65 | 0.63 | 0.79 | |
frameworks/react-dom.production.16.3.2 | 493 | 498 | 409 | 294 | 0.60 | 0.59 | 0.72 |
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
version: '2' | |
services: | |
api: | |
volumes: | |
- "nfsmount:${CONTAINER_DIR}" | |
volumes: | |
nfsmount: | |
driver: local | |
driver_opts: |
- I'm comparing the speed of inserting UUIDs into columns which are indexed with btree vs hash
- Want to ensure that I'm measuring both insert queries at their best performance
- Profiled each of them to check whether there is interference by server misconfiguration
Both were sampled with perf record -F 99 -u postgres -g --call-graph dwarf -- sleep 180
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/env bash | |
# Run this file on the host machine that is running dockerd | |
# It will allow you to access your docker containers via hostname aliases | |
# Remove old lines with suffix | |
sed -i -e "/#docker-temp/d" /etc/hosts | |
# Collect ip-addresses and hostnames of running docker-compose containers | |
ADDR=$(docker-compose ps -q | xargs --no-run-if-empty -I --- docker exec --- hostname -I| sed -e 's/ /-/') |
We can make this file beautiful and searchable if this error is corrected: It looks like row 10 should actually have 2 columns, instead of 3 in line 9.
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
1000, hashchk | |
1001, isamchk | |
1002, NO | |
1003, YES | |
1004, Can't create file '%s' (errno: %d - %s) | |
1005, Can't create table '%s' (errno: %d) | |
1006, Can't create database '%s' (errno: %d) | |
1007, Can't create database '%s'; database exists | |
1008, Can't drop database '%s'; database doesn't exist | |
1009, Error dropping database (can't delete '%s', errno: %d) |
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
# filter by request host header | |
varnishlog -q 'ReqHeader ~ "Host: example.com"' | |
# filter by request url | |
varnishlog -q 'ReqURL ~ "^/some/path/"' | |
# filter by client ip (behind reverse proxy) | |
varnishlog -q 'ReqHeader ~ "X-Real-IP: .*123.123.123.123"' | |
# filter by request host header and show request url and referrer header |
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
javascript | |
ES6ValidationInspection | |
JSAccessibilityCheckInspection | |
JSBitwiseOperatorUsageInspection | |
JSCheckFunctionSignaturesInspection | |
JSClosureCompilerSyntaxInspection | |
JSCommentMatchesSignatureInspection | |
JSComparisonWithNaNInspection | |
JSConsecutiveCommasInArrayLiteralInspection |
NewerOlder