Bugzilla – Attachment 163516 Details for
Bug 28173
Add plugin hooks object_store_pre and object_store_post
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28173: [DO NOT PUSH] Benchmark script
Bug-28173-DO-NOT-PUSH-Benchmark-script.patch (text/plain), 1.12 KB, created by
Julian Maurice
on 2024-03-20 09:18:18 UTC
(
hide
)
Description:
Bug 28173: [DO NOT PUSH] Benchmark script
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2024-03-20 09:18:18 UTC
Size:
1.12 KB
patch
obsolete
>From 20f1c7760460fd2130c4d471d782db00a1f12ae7 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Wed, 20 Mar 2024 10:17:40 +0100 >Subject: [PATCH] Bug 28173: [DO NOT PUSH] Benchmark script > >--- > bench-object-store-hooks.pl | 26 ++++++++++++++++++++++++++ > 1 file changed, 26 insertions(+) > create mode 100755 bench-object-store-hooks.pl > >diff --git a/bench-object-store-hooks.pl b/bench-object-store-hooks.pl >new file mode 100755 >index 0000000000..f17c371888 >--- /dev/null >+++ b/bench-object-store-hooks.pl >@@ -0,0 +1,26 @@ >+#!/usr/bin/perl >+ >+use Modern::Perl; >+use Time::HiRes qw(gettimeofday tv_interval); >+ >+use Koha::City; >+ >+my $schema = Koha::Database->schema; >+$schema->txn_begin; >+ >+my $city = Koha::City->new( { city_name => 'Marseille' } ); >+$city->store; >+my $t0 = [gettimeofday]; >+ >+my $n = 10_000; >+for ( 1 .. $n ) { >+ $city->make_column_dirty('city_name'); >+ $city->store; >+} >+ >+my $elapsed = tv_interval( $t0, [gettimeofday] ); >+printf "Time for %d store (s): %.3f\n", $n, $elapsed; >+printf "Time per store (µs): %.3f\n", ($elapsed / $n) * 1_000_000; >+ >+ >+$schema->txn_rollback; >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28173
:
119872
|
163509
| 163516