You can use strace on a specific pid to figure out what a specific process is doing, e.g.:
strace -fp <pid>
You might see something like:
select(9, [3 5 8], [], [], {0, 999999}) = 0 (Timeout)
| <?php | |
| use Doctrine\ORM\Mapping as ORM; | |
| use Doctrine\Common\Collections\ArrayCollection; | |
| /** | |
| * @ORM\Entity() | |
| * @ORM\Table(name="user") | |
| */ | |
| class User |
First, you have to enable profiling
> db.setProfilingLevel(1)
Now let it run for a while. It collects the slow queries ( > 100ms) into a capped collections, so queries go in and if it's full, old queries go out, so don't be surprised that it's a moving target...
| # ~/.gitconfig | |
| # Add this to your global git configuration file | |
| # Change phpstorm to webstorm, if you use that. | |
| # Diff and merge tool changes | |
| # Run `git difftool <directory/file>...` or `git mergetool <directory/file>...` | |
| [merge] | |
| tool = phpstorm | |
| [diff] | |
| tool = phpstorm |
This is only a summary. For a full list of changes see the NEWS file.
| Feature | RFC / announcement | Author |
|---|---|---|
| Bundled ZendOptimizer+ as OPcache | https://wiki.php.net/rfc/optimizerplus | zeev |
| alias gundo='git reset HEAD~ && git clean -df' |
| var collectionNames = db.getCollectionNames(), stats = []; | |
| collectionNames.forEach(function (n) { stats.push(db[n].stats()); }); | |
| stats = stats.sort(function(a, b) { return b['size'] - a['size']; }); | |
| for (var c in stats) { print(stats[c]['ns'] + ": " + stats[c]['size'] + " (" + stats[c]['storageSize'] + ")"); } |
| #!/bin/bash | |
| # | |
| # Watches the folder or files passed as arguments to the script and when it | |
| # detects a change it automatically refreshes the current selected Chrome tab or | |
| # window. | |
| # | |
| # http://razius.com/articles/auto-refreshing-google-chrome-on-file-changes/ | |
| # | |
| # Usage: | |
| # ./chrome-refresh.sh /folder/to/watch /some/folder/file_to_watch.html |
| var AWS = require('aws-sdk'); | |
| AWS.config.update({ | |
| accessKeyId: '{AWS_KEY}', | |
| secretAccessKey: '{AWS_SECRET}', | |
| region: '{SNS_REGION}' | |
| }); | |
| var sns = new AWS.SNS(); |