Skip to content

Commit

Permalink
test: for performance runs at the info level it would be in our best …
Browse files Browse the repository at this point in the history
…interest to also record the start of the create not just the end for each of these steps
  • Loading branch information
Bryce-Soghigian committed Dec 7, 2024
1 parent 5b04593 commit 451e947
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/providers/instance/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func (p *DefaultProvider) Delete(ctx context.Context, resourceName string) error
func (p *DefaultProvider) createAKSIdentifyingExtension(ctx context.Context, vmName string) (err error) {
vmExt := p.getAKSIdentifyingExtension()
vmExtName := *vmExt.Name
logging.FromContext(ctx).Debugf("Creating virtual machine AKS identifying extension for %s", vmName)
logging.FromContext(ctx).Infof("Creating virtual machine AKS identifying extension for %s", vmName)
v, err := createVirtualMachineExtension(ctx, p.azClient.virtualMachinesExtensionClient, p.resourceGroup, vmName, vmExtName, *vmExt)
if err != nil {
logging.FromContext(ctx).Errorf("Creating VM AKS identifying extension for VM %q failed, %w", vmName, err)
Expand All @@ -212,7 +212,7 @@ func (p *DefaultProvider) createAKSIdentifyingExtension(ctx context.Context, vmN
func (p *DefaultProvider) createCSExtension(ctx context.Context, vmName string, cse string, isWindows bool) (err error) {
vmExt := p.getCSExtension(cse, isWindows)
vmExtName := *vmExt.Name
logging.FromContext(ctx).Debugf("Creating virtual machine CSE for %s", vmName)
logging.FromContext(ctx).Infof("Creating virtual machine CSE for %s", vmName)
v, err := createVirtualMachineExtension(ctx, p.azClient.virtualMachinesExtensionClient, p.resourceGroup, vmName, vmExtName, *vmExt)
if err != nil {
logging.FromContext(ctx).Errorf("Creating VM CSE for VM %q failed, %w", vmName, err)
Expand Down Expand Up @@ -291,7 +291,7 @@ type createNICOptions struct {
func (p *DefaultProvider) createNetworkInterface(ctx context.Context, opts *createNICOptions) (string, error) {
nic := p.newNetworkInterfaceForVM(opts)
p.applyTemplateToNic(&nic, opts.LaunchTemplate)
logging.FromContext(ctx).Debugf("Creating network interface %s", opts.NICName)
logging.FromContext(ctx).Infof("Creating network interface %s", opts.NICName)
res, err := createNic(ctx, p.azClient.networkInterfacesClient, p.resourceGroup, opts.NICName, nic)
if err != nil {
return "", err
Expand Down Expand Up @@ -473,7 +473,7 @@ func (p *DefaultProvider) launchInstance(
nodeIdentityIDs := options.FromContext(ctx).NodeIdentities
vm := newVMObject(resourceName, nicReference, zone, capacityType, p.location, sshPublicKey, nodeIdentityIDs, nodeClass, launchTemplate, instanceType, p.provisionMode)

logging.FromContext(ctx).Debugf("Creating virtual machine %s (%s)", resourceName, instanceType.Name)
logging.FromContext(ctx).Infof("Creating virtual machine %s (%s)", resourceName, instanceType.Name)
// Uses AZ Client to create a new virtual machine using the vm object we prepared earlier
resp, err := p.createVirtualMachine(ctx, vm, resourceName)
if err != nil {
Expand Down

0 comments on commit 451e947

Please sign in to comment.