Skip to content

Instantly share code, notes, and snippets.

@ocean90

ocean90/21760.php

Created Sep 29, 2016
Embed
What would you like to do?
<?php
# for((i=100;i--;)); do php 21760.php; done
include __DIR__ . '/wp-load.php';
global $wpdb;
$memory = memory_get_usage();
$num_queries = $wpdb->num_queries;
$start = microtime( true );
get_term_by( 'slug', 'tag-117', 'post_tag' );
get_term_by( 'slug', 'tag-117', 'post_tag' );
get_term_by( 'slug', 'tag-117', 'post_tag' );
get_term_by( 'slug', 'tag-117', 'post_tag' );
get_term_by( 'slug', 'tag-117', 'post_tag' );
get_term_by( 'slug', 'tag-117', 'post_tag' );
get_term_by( 'name', 'Tag 117', 'post_tag' );
get_term_by( 'name', 'Tag 117', 'post_tag' );
get_term_by( 'name', 'Tag 117', 'post_tag' );
get_term_by( 'name', 'Tag 117', 'post_tag' );
get_term_by( 'name', 'Tag 117', 'post_tag' );
get_term_by( 'name', 'Tag 117', 'post_tag' );
get_term_by( 'name', 'Category 106', 'category' );
get_term_by( 'name', 'Category 106', 'category' );
get_term_by( 'name', 'Category 106', 'category' );
get_term_by( 'name', 'Category 106', 'category' );
get_term_by( 'name', 'Category 106', 'category' );
get_term_by( 'name', 'Category 106', 'category' );
get_term_by( 'id', 107, 'category' );
get_term_by( 'id', 107, 'category' );
get_term_by( 'id', 107, 'category' );
get_term_by( 'id', 107, 'category' );
get_term_by( 'id', 107, 'category' );
get_term_by( 'id', 107, 'category' );
$end = microtime( true );
echo ( $end - $start ) . "\t";
echo ( $wpdb->num_queries - $num_queries ) . "\t";
echo ( ( memory_get_usage() - $memory ) / 1024 / 1024 ) . "\t\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.