Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Y
YCSB
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Adnan Ahmad
YCSB
Commits
70c480ec
Commit
70c480ec
authored
15 years ago
by
Brian Frank Cooper
Browse files
Options
Downloads
Patches
Plain Diff
Adding documentation.
parent
6e426ca7
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/com/yahoo/ycsb/DBFactory.java
+0
-16
0 additions, 16 deletions
src/com/yahoo/ycsb/DBFactory.java
src/com/yahoo/ycsb/Measurements.java
+18
-0
18 additions, 0 deletions
src/com/yahoo/ycsb/Measurements.java
with
18 additions
and
16 deletions
src/com/yahoo/ycsb/DBFactory.java
+
0
−
16
View file @
70c480ec
...
...
@@ -47,22 +47,6 @@ public class DBFactory
ret
.
setProperties
(
properties
);
return
new
DBWrapper
(
ret
);
/*
DB ret;
if (dbname.compareTo("BasicDB")==0)
{
ret=new BasicDB();
}
else
{
throw new UnknownDBException(dbname);
}
ret.setProperties(properties);
return ret;
*/
}
}
This diff is collapsed.
Click to expand it.
src/com/yahoo/ycsb/Measurements.java
+
18
−
0
View file @
70c480ec
...
...
@@ -42,6 +42,9 @@ public class Measurements
measurementproperties
=
props
;
}
/**
* Return the singleton Measurements object.
*/
public
synchronized
static
Measurements
getMeasurements
()
{
if
(
singleton
==
null
)
...
...
@@ -56,6 +59,9 @@ public class Measurements
private
Properties
_props
;
/**
* Create a new object with the specified properties.
*/
public
Measurements
(
Properties
props
)
{
data
=
new
HashMap
<
String
,
OneMeasurement
>();
...
...
@@ -84,6 +90,9 @@ public class Measurements
}
}
/**
* Report a single value of a single metric. E.g. for read latency, operation="READ" and latency is the measured value.
*/
public
synchronized
void
measure
(
String
operation
,
int
latency
)
{
if
(!
data
.
containsKey
(
operation
))
...
...
@@ -108,6 +117,9 @@ public class Measurements
}
}
/**
* Report a return code for a single DB operaiton.
*/
public
void
reportReturnCode
(
String
operation
,
int
code
)
{
if
(!
data
.
containsKey
(
operation
))
...
...
@@ -123,6 +135,9 @@ public class Measurements
data
.
get
(
operation
).
reportReturnCode
(
code
);
}
/**
* Print the full report to the listed PrintStream.
*/
public
void
printReport
(
PrintStream
out
)
{
for
(
OneMeasurement
m
:
data
.
values
())
...
...
@@ -131,6 +146,9 @@ public class Measurements
}
}
/**
* Return a one line summary of the measurements.
*/
public
String
getSummary
()
{
String
ret
=
""
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment