Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
nptool nptool
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Docker-in-Docker (DinD) capabilities of public runners deactivated. More info

  • np
  • nptoolnptool
  • Issues
  • #47

Closed
Open
Created Oct 27, 2017 by Greg Christian@gchristianDeveloper

Limiting the range of events for npanalysis

Currently you can specify the -L <arg> flag to npanalysis to limit the range of analyzed events from 0 -> <arg>. I am interested in also being able to specify the starting event too, i.e. allowing the analysis to start with some event other than event zero.

I've made a simple change to the NPOptionManager code (and npanalysis.cxx) adding a -F flag that specifies the beginning of the event loop (default is zero). Using this, the analysis goes from F -> F+L (with a check to not go past the end of the chain). This should fully maintain backward compatibility.

Before pushing I wanted to make sure it's an acceptable change to make, since it modifies the core parts of the package. Any thoughts?

I also changed the event loop variable to unsigned long, to minimize the chance that it overflows. It was unsigned int before, which is 32 bit on most systems (~4e9 event maximum), but could conceivably be 16 bit (~65k maximum).

Here's the relevant changes in case anyone wants to inspect.

  unsigned long first_entry = myOptionManager->GetFirstEntryToAnalyse(); // defaults to zero
  unsigned long nentries = Chain->GetEntries();
  if(nentries> myOptionManager->GetNumberOfEntryToAnalyse() && myOptionManager->GetNumberOfEntryToAnalyse()>0)
    nentries = myOptionManager->GetNumberOfEntryToAnalyse() ;
  if(nentries + first_entry > Chain->GetEntries()) {nentries = first_entry+Chain->GetEntries();}

(event loop):

 for (unsigned long i = first_entry ; i < nentries + first_entry; i++) {
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking