Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
R
RcppUUID
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Artem Klevtsov
RcppUUID
Commits
817834ea
Verified
Commit
817834ea
authored
Apr 25, 2020
by
Artem Klevtsov
😹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update docs
parent
71939438
Pipeline
#139791943
failed with stages
in 9 minutes and 5 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
15 deletions
+21
-15
R/RcppExports.R
R/RcppExports.R
+4
-2
README.md
README.md
+9
-9
man/uuid_generate_name.Rd
man/uuid_generate_name.Rd
+4
-2
src/uuid_name.cpp
src/uuid_name.cpp
+4
-2
No files found.
R/RcppExports.R
View file @
817834ea
...
...
@@ -4,13 +4,15 @@
#' @title Generate UUIDs Version 5
#'
#' @description
#' Function generates uuids using operating system provided entropy.
#' Function generates name-based uuid is derived from content in a namespace.
#' A uuid with identical content shall yield the same uuid.
#' Hashing algorithm is SHA1. Namespace is X.500 DN.
#'
#' @param x Character vector.
#' @return Character vector with UUIDs.
#'
#' @note
#' This function generates valid uuids for the `NA`.
#' This function generates valid uuids for the `NA`
and empty strings
.
#'
#' @export
#'
...
...
README.md
View file @
817834ea
...
...
@@ -48,15 +48,15 @@ Generate single UUID:
```
r
RcppUUID
::
uuid_generate_random
(
1
)
#> [1] "
ca141f08-f799-4a7c-8468-c8360660b029
"
#> [1] "
f33469b6-375f-43d0-84a4-f0cd1a9dded8
"
```
Generate multiple UUIDs:
```
r
RcppUUID
::
uuid_generate_random
(
5
)
#> [1] "
1a4959ea-9790-4004-b0ce-adeaa3b66199" "ec42102d-49a8-4c38-9c75-e7f8af651d74" "ef8b350e-5bf4-4bf5-b0da-397b617498d9
"
#> [4] "8
9eb3374-21ec-4a8c-b731-0fa2542bd58a" "c0fe4663-1e10-44d3-92ce-d72cdb51db2c
"
#> [1] "
0f147b42-a342-40da-95aa-2b6c99dd3a98" "54fdcb4d-fae2-4b19-8317-1a5a9b16f9ab" "7a845efc-1421-4ef3-ba9b-2b5d3ef63436
"
#> [4] "8
dd0673d-3c0a-4fcf-babe-e6494ea9ec23" "c4231d2b-5a32-4efe-b4b0-5ea410511385
"
```
Check uniques:
...
...
@@ -77,9 +77,9 @@ microbenchmark::microbenchmark(
RcppUUID
=
RcppUUID
::
uuid_generate_random
()
)
#> Unit: microseconds
#> expr min
lq mean median uq max neval cld
#> uuid 1
4.278 14.9105 33.79106 15.1435 15.4240 1852.201 100 a
#> RcppUUID 7.
129 7.6680 8.72125 8.3140 8.7985 41.344 100 a
#> expr min
lq mean median uq max neval
#> uuid 1
5.401 16.176 39.18941 16.3925 16.8025 2172.246 100
#> RcppUUID 7.
691 8.407 9.91202 9.4085 9.9535 19.778 100
```
Multiple UUIDs:
...
...
@@ -91,9 +91,9 @@ microbenchmark::microbenchmark(
RcppUUID
=
RcppUUID
::
uuid_generate_random
(
n
)
)
#> Unit: milliseconds
#> expr min lq mean median uq max neval
cld
#> uuid 72.
080692 73.009557 76.87999 73.463078 73.671392 284.4107 100 b
#> RcppUUID 7.5
54901 7.868102 11.07176 8.437234 9.014238 265.7360 100 a
#> expr min lq mean median uq max neval
#> uuid 72.
557325 74.371166 81.24056 75.614255 77.783372 291.6280 100
#> RcppUUID 7.5
67676 8.075046 11.16130 8.498816 8.764609 175.4246 100
```
### Generate version 5 UUIDs
...
...
man/uuid_generate_name.Rd
View file @
817834ea
...
...
@@ -13,10 +13,12 @@ uuid_generate_name(x)
Character vector with UUIDs.
}
\description{
Function generates uuids using operating system provided entropy.
Function generates name-based uuid is derived from content in a namespace.
A uuid with identical content shall yield the same uuid.
Hashing algorithm is SHA1. Namespace is X.500 DN.
}
\note{
This function generates valid uuids for the \code{NA}.
This function generates valid uuids for the \code{NA}
and empty strings
.
}
\examples{
# generate name UUIDs
...
...
src/uuid_name.cpp
View file @
817834ea
...
...
@@ -10,13 +10,15 @@ using boost::uuids::uuid;
//' @title Generate UUIDs Version 5
//'
//' @description
//' Function generates uuids using operating system provided entropy.
//' Function generates name-based uuid is derived from content in a namespace.
//' A uuid with identical content shall yield the same uuid.
//' Hashing algorithm is SHA1. Namespace is X.500 DN.
//'
//' @param x Character vector.
//' @return Character vector with UUIDs.
//'
//' @note
//' This function generates valid uuids for the `NA`.
//' This function generates valid uuids for the `NA`
and empty strings
.
//'
//' @export
//'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment