]> git.proxmox.com Git - pve-manager.git/blame_incremental - test/perftest2.pl
guest import: allow setting VLAN-tag
[pve-manager.git] / test / perftest2.pl
... / ...
CommitLineData
1#!/usr/bin/perl
2
3use lib '../../';
4use strict;
5use warnings;
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
16my $cmd = "ab -c 10 -n 1000 -k -C 'PVEAuthCookie=$ticket' https://$hostname:8006/api2/json";
17print "$cmd\n";
18system($cmd) == 0 || die "command failed - $!\n";