]> git.proxmox.com Git - pve-manager.git/blob - test/perftest2.pl
ui: lvm: expose saferemove setting
[pve-manager.git] / test / perftest2.pl
1 #!/usr/bin/perl
2
3 use lib '../../';
4 use strict;
5 use warnings;
6 use Time::HiRes qw( usleep ualarm gettimeofday tv_interval );
7 use PVE::INotify;
8 use PVE::AccessControl;
9
10 my $hostname = PVE::INotify::read_file("hostname");
11
12 # normally you use username/password,
13 # but we can simply create a ticket if we are root
14 my $ticket = PVE::AccessControl::assemble_ticket('root@pam');
15
16 my $cmd = "ab -c 10 -n 1000 -k -C 'PVEAuthCookie=$ticket' https://$hostname:8006/api2/json";
17 print "$cmd\n";
18 system($cmd) == 0 || die "command failed - $!\n";