]> git.proxmox.com Git - pve-manager.git/blame - test/perftest2.pl
guest import: allow setting VLAN-tag
[pve-manager.git] / test / perftest2.pl
CommitLineData
90d226ab 1#!/usr/bin/perl
52713981
DM
2
3use lib '../../';
4use strict;
90d226ab 5use warnings;
52713981
DM
6use Time::HiRes qw( usleep ualarm gettimeofday tv_interval );
7use PVE::INotify;
8use PVE::AccessControl;
9
10my $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
14my $ticket = PVE::AccessControl::assemble_ticket('root@pam');
15
26dccfdb 16my $cmd = "ab -c 10 -n 1000 -k -C 'PVEAuthCookie=$ticket' https://$hostname:8006/api2/json";
52713981
DM
17print "$cmd\n";
18system($cmd) == 0 || die "command failed - $!\n";