Skip to content

Instantly share code, notes, and snippets.

@martyf
Created February 9, 2024 06:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martyf/626e47a9f2f26829e08e5af350382dc7 to your computer and use it in GitHub Desktop.
Save martyf/626e47a9f2f26829e08e5af350382dc7 to your computer and use it in GitHub Desktop.
Test Tags to demonstrate the performance gains of using Blink in Statamic
<?php
namespace App\Tags;
use Statamic\Tags\Tags;
class TagTestSlow extends Tags
{
public function index()
{
$time_start = microtime(true);
// sleep to simulate a slow piece of code
sleep(1);
$time_end = microtime(true);
return number_format(($time_end - $time_start), 5);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment