Skip to content

Conversation

@rubenruizdegauna
Copy link
Contributor

@rubenruizdegauna rubenruizdegauna commented Jul 15, 2021

  • Storage Sampler for macos
  • Disk metrics for System Sampler

To take into account:

  • APFS partitions share total bytes and free bytes information
  • IO counters only for physical drives not partitions

func (ss *Sampler) Disabled() bool {
return ss.Interval() <= config.FREQ_DISABLE_SAMPLING
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In macos partitions don't have IO Counters related data so samples won't. But we can use Storage Sampler IOCounters for IO related information inside System Sampler. This is the reason of exporting these 👇

@rubenruizdegauna rubenruizdegauna force-pushed the mac_os_ins/storage_sampler branch 7 times, most recently from e25e885 to e5e6d62 Compare July 16, 2021 09:32
@@ -1,5 +1,7 @@
// Copyright 2020 New Relic Corporation. All rights reserved.
// SPDX-License-Identifier: Apache-2.0
// +build linux windows
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test was failing on macos. Removed from macos tests to move forward while investigating and maybe involving coreint team.


unit-test-macos:
name: Macos unit tests
runs-on: macos-10.15
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

macos-11 giving errors

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which ones? I only get to see 10.15 errors on the GHA record

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some "unexpected errors" : actions/runner-images#841
Same screen as in the link :(

I saw in the comments that wasn't happening in 10 and didn't have any since I changed it

)

var (
SupportedFileSystems = map[string]bool{}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing FSs

@rubenruizdegauna rubenruizdegauna force-pushed the mac_os_ins/storage_sampler branch 6 times, most recently from dc17002 to 2d094dd Compare July 19, 2021 13:59
//assert.Equal(t, expected, hip.Data()[0])

assert.Equal(t, expected.System, "system")
//assert.Equal(t, expected.Distro, "macOS 11.2.3")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

Copy link
Contributor Author

@rubenruizdegauna rubenruizdegauna Jul 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those are being read from the host machine, and so they have different values depending on where are being run. As I enabled tests in this PR they are raising now :(
I will improve the comment above 😅

//Commented until fix these test (out of scope in this task)

edit: now I realised that it's not properly fixed, as I assert against expected :carlton: . Updating comment and fix


// PartitionsTTL Time duration to expire the cached list of storage partitions.
// Default: 60
// Default: 60s
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏


// fullSample returns a sample containing usage data
func fullSample(t *testing.T, samples sample.EventBatch) *storage.Sample {
t.Helper()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

varas
varas previously approved these changes Jul 20, 2021
varas
varas previously approved these changes Jul 20, 2021
@rubenruizdegauna rubenruizdegauna merged commit 68cf38e into master Jul 20, 2021
@rubenruizdegauna rubenruizdegauna deleted the mac_os_ins/storage_sampler branch July 22, 2021 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants