Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added performance metrics LabGraph issue 78 #88

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mark-nguyen1
Copy link

Description

Please include a summary of the feature or issue being fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes #(issue)

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Feature/Issue validation/testing

Please describe the tests [UT/IT] that you ran to verify your changes and relevent result summary. Provide instructions so it can be reproduced.
Please also list any relevant details for your test configuration.

  • Test A

  • Test B

  • Unit Test / Integration Test (UT/IT) execution results

  • Logs

Checklist:

  • Have you added tests that prove your fix is effective or that this feature works?
  • New and existing unit tests pass locally with these changes?
  • Has code been commented, particularly in hard-to-understand areas?
  • Have you made corresponding changes to the documentation?

@facebook-github-bot
Copy link

Hi @wixair!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@mark-nguyen1
Copy link
Author

Added real-time performance metrics of Latency, Throughput, and Data rate. Demoed at maintainer meeting 8/11/22 and maintainer said good to pull request



data = deque()
Copy link
Contributor

Choose a reason for hiding this comment

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

In the future, deque can be replaced by a more performant buffer data structure.

global data
global throughput_data
global datarate_data
global one_second_must_pass
Copy link
Contributor

@jfResearchEng jfResearchEng Aug 18, 2022

Choose a reason for hiding this comment

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

Please try to avoid using global here.

global data
global throughput_data
global datarate_data
global one_second_must_pass
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here for global.

(state: RootState) => state.ws
);
const { mockGraph } = useSelector((state: RootState) => state.mock);
// const mockData = useSelector(
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove dead code.

@@ -12,7 +12,7 @@ import {
SettingsApplicationsRounded,
AlignHorizontalLeftOutlined,
AlignVerticalTopOutlined,
Mode,
// Mode,
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove all the dead codes.

@@ -56,6 +56,10 @@ def add_message_1(self, message: RandomMessage) -> None:
"grouping": grouping,
"timestamp": message.timestamp,
"numpy": list(message.data),

Copy link
Contributor

Choose a reason for hiding this comment

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

Unnecessary space, have the black and flake8 checks been run? Reference: #76

@@ -1,17 +1,14 @@
#!/usr/bin/env python3
# Copyright 2004-present Facebook. All Rights Reserved.
# -*- coding: utf-8 -*-
# Copyright 2004-present Facebook. All Rights Reserve
Copy link
Contributor

Choose a reason for hiding this comment

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

Use the correct header.

data: np.ndarray

latency: any = 1.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Use the correct type, try to avoid using any unless it intends to be generic.

@@ -0,0 +1,959 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this autogenerated file or a compulsory file for this PR?

@jfResearchEng
Copy link
Contributor

jfResearchEng commented Aug 18, 2022

Please add the relevant tests and clear description on how the tests can be run in relevant places (e.g. documentation and PR description update).

Copy link

@varshar4 varshar4 left a comment

Choose a reason for hiding this comment

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

I definitely agree with all of the comments left by Jimmy, but overall it looks good to me too!

@varshar4
Copy link

Make sure to add the contributor license agreement though!

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.

4 participants