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

Ensure to send performance timings as integer values #17372

Merged
merged 2 commits into from Mar 23, 2021
Merged

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Mar 22, 2021

Description:

refs #17371

Review

  • Functional review done
  • Potential edge cases thought about (behavior of the code with strange input, with strange internal state or possible interactions with other Matomo subsystems)
  • Usability review done (is anything maybe unclear or think about anything that would cause people to reach out to support)
  • Security review done see checklist
  • Code review done
  • Tests were added if useful/possible
  • Reviewed for breaking changes
  • Developer changelog updated if needed
  • Documentation added if needed
  • Existing documentation updated if needed

@sgiehl sgiehl added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Needs Review PRs that need a code review labels Mar 22, 2021
@sgiehl sgiehl added this to the 4.3.0 milestone Mar 22, 2021
@sgiehl
Copy link
Member Author

sgiehl commented Mar 22, 2021

build js

@diosmosis
Copy link
Member

Should we maybe do this server side as well to be safe in case people use the tracker API directly or use log importing?

Copy link
Member

@diosmosis diosmosis left a comment

Choose a reason for hiding this comment

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

If adding server side changes, can we also change a test so it uses a float value in tracking?

@diosmosis diosmosis removed the Needs Review PRs that need a code review label Mar 22, 2021
@sgiehl
Copy link
Member Author

sgiehl commented Mar 23, 2021

@diosmosis looking at the code it seems the values should actually already be casted to integer server side. At least they are defined as those here:

'pf_net' => array(-1, 'int'),
'pf_srv' => array(-1, 'int'),
'pf_tfr' => array(-1, 'int'),
'pf_dm1' => array(-1, 'int'),
'pf_dm2' => array(-1, 'int'),
'pf_onl' => array(-1, 'int'),

So the changes here actually won't have a big effect. But it's still useless to send floats if we use them as integers...

@diosmosis diosmosis merged commit 2b35b46 into 4.x-dev Mar 23, 2021
@diosmosis diosmosis deleted the performance branch March 23, 2021 15:07
@diosmosis
Copy link
Member

makes sense 👍

@flamisz flamisz mentioned this pull request Apr 7, 2021
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants