Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
G
gpucloudsim
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LPDS
gpucloudsim
Commits
656e4f68
Commit
656e4f68
authored
Nov 07, 2011
by
williamvoor@gmail.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SWF workload reader
parent
bd4c25f9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
587 additions
and
0 deletions
+587
-0
WorkloadFileReader.java
...n/java/org/cloudbus/cloudsim/util/WorkloadFileReader.java
+504
-0
WorkloadModel.java
...c/main/java/org/cloudbus/cloudsim/util/WorkloadModel.java
+33
-0
LCG.swf.gz
modules/cloudsim/src/test/LCG.swf.gz
+0
-0
WorkloadFileReaderTest.java
...va/org/cloudbus/cloudsim/util/WorkloadFileReaderTest.java
+50
-0
No files found.
modules/cloudsim/src/main/java/org/cloudbus/cloudsim/util/WorkloadFileReader.java
0 → 100755
View file @
656e4f68
This diff is collapsed.
Click to expand it.
modules/cloudsim/src/main/java/org/cloudbus/cloudsim/util/WorkloadModel.java
0 → 100755
View file @
656e4f68
/*
* Title: GridSim Toolkit
* Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation
* of Parallel and Distributed Systems such as Clusters and Grids
* License: GPL - http://www.gnu.org/copyleft/gpl.html
*/
package
org
.
cloudbus
.
cloudsim
.
util
;
import
java.util.List
;
import
org.cloudbus.cloudsim.Cloudlet
;
/**
* This interface defines what a workload model should provide. A workload model
* generates a list of jobs that can be dispatched to a resource by
* {@link Workload}.
*
* @author Marcos Dias de Assuncao
* @since 5.0
*
* @see Workload
* @see WorkloadFileReader
*/
public
interface
WorkloadModel
{
/**
* Returns a list with the jobs generated by the workload.
*
* @return a list with the jobs generated by the workload.
*/
List
<
Cloudlet
>
generateWorkload
();
}
modules/cloudsim/src/test/LCG.swf.gz
0 → 100755
View file @
656e4f68
File added
modules/cloudsim/src/test/java/org/cloudbus/cloudsim/util/WorkloadFileReaderTest.java
0 → 100644
View file @
656e4f68
package
org
.
cloudbus
.
cloudsim
.
util
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
java.io.File
;
import
java.io.FileNotFoundException
;
import
java.util.List
;
import
org.cloudbus.cloudsim.Cloudlet
;
import
org.junit.After
;
import
org.junit.AfterClass
;
import
org.junit.Before
;
import
org.junit.BeforeClass
;
import
org.junit.Test
;
public
class
WorkloadFileReaderTest
{
@BeforeClass
public
static
void
setUpBeforeClass
()
throws
Exception
{
}
@AfterClass
public
static
void
tearDownAfterClass
()
throws
Exception
{
}
@Before
public
void
setUp
()
throws
Exception
{
}
@After
public
void
tearDown
()
throws
Exception
{
}
@Test
public
void
read
()
throws
FileNotFoundException
{
WorkloadModel
r
=
new
WorkloadFileReader
(
"src"
+
File
.
separator
+
"test"
+
File
.
separator
+
"LCG.swf.gz"
,
1
);
List
<
Cloudlet
>
cloudletlist
=
r
.
generateWorkload
();
assertEquals
(
188041
,
cloudletlist
.
size
());
for
(
Cloudlet
cloudlet
:
cloudletlist
)
{
assertTrue
(
cloudlet
.
getCloudletLength
()
>
0
);
}
}
}
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