Skip to content

Improve the usage of Sysfs in the interaction with EV3Dev #765

@jabrena

Description

@jabrena

In the previous Issue:
#748

We improved the performance with current architecture, the usage of Sysfs. Sysfs in the current form, is a stateless class with static methods.

Ideas to improve in this iteration:

  • Moving from static methods, to instance methods
  • Add setSysfs to Mock Sysfs to improve testing. Using Guava, it could be possible to expose only for testing with the annotation @VisibleForTesting but I don´t want to increase the weight of the jar in 2mb.

@dwalend, what other ideas, do you have?
@JakubVanek, what other ideas, do you have?

In your opinion, what state is necessary to maintain in Sysfs and have some kind of concurrency protection?

Criterias for PR:

  • Branch: sysfs_perf2
  • Code pass Checkstyle: gradle checkstyleMain
  • Benchmarks: JMH
  • Complexity: Reduced
  • Number of changes: Minimum
  • Tests: Every new class, requiere Unit Tests. Review how to add Concurrency tests to avoid concurrency issues.

We will analyse for the classes:

  • ev3dev.sensors.Battery;
  • ev3dev.actuators.ev3.EV3Led;
  • ev3dev.actuators.lego.motors.EV3LargeRegulatedMotor;

We will begin with Battery, an easy case and later, we will tackle a complex case like a Motor.

image

Juan Antonio

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy